:root {
  /* Brand Colors - Softer Palette */
  --primary: #86efac;
  --primary-hover: #4ade80;
  --bg-body: #f4f7f4;
  /* Light gray-green */
  --bg-card: #eaefea;
  /* Slightly darker than body */
  --text-main: #334155;
  /* Dark gray */
  --text-muted: #64748b;
  /* Medium gray */
  --border: #cbd5e1;

  /* Status Colors (Muted) */
  --success: #86efac;
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --danger: #f87171;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --warning: #fbbf24;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;

  /* Spacing & Radius */
  --radius: 16px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* Dark Mode - Soft Gray-Emerald */
body.dark {
  --primary: #a7f3d0;
  --primary-hover: #6ee7b7;
  --bg-body: #121212;
  /* Rich dark gray */
  --bg-card: #1c1c1c;
  /* Slightly lighter gray */
  --text-main: #e5e5e5;
  /* Soft white */
  --text-muted: #a0a0a0;
  /* Muted gray */
  --border: #334155;
  --success-bg: #064e3b;
  --danger-bg: #450a0a;
  --warning-bg: #451a03;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  /* Space for footer */
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3 {
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  margin-top: 16px;
}

/* Logo styling */
.logo {
  display: block;
  object-fit: contain;
  margin-bottom: 16px;
}

.logo-center {
  margin-left: auto;
  margin-right: auto;
}

.logo-large {
  height: 60px;
}

.logo-small {
  height: 40px;
}

.text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  margin-top: 16px;
  display: inline-block;
}

.text-link:hover {
  text-decoration: underline;
}

/* Components */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
  object-fit: cover;
  aspect-ratio: 16/9;
  background: #f1f5f9;
}

/* Forms */
input,
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
  background: var(--bg-card);
  color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.15);
}

/* Buttons */
button {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #1e293b;
  /* Darker text on soft green for contrast */
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
}

button.secondary:hover {
  background: var(--bg-body);
  border-color: var(--border);
}

/* Action Buttons (Small) */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.actions button {
  margin: 0;
  padding: 10px;
  font-size: 0.875rem;
  flex: 1;
}

button.success {
  background: var(--success);
}

button.success:hover {
  background: #059669;
}

button.danger {
  background: var(--danger);
  color: #f8fafc;
}

button.danger:hover {
  background: #dc2626;
  color: #f8fafc;
}

/* Utilities */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-body);
  color: var(--text-muted);
}

.badge.present,
.badge.approved {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.absent,
.badge.rejected,
.badge.missed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge.pending {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: block;
}

/* File Upload */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
}

.btn-upload {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 140px;
  margin-top: 8px;
  gap: 8px;
}

.btn-upload:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
}

/* Notifications */
.notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-toast {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-left: 4px solid var(--primary);
  animation: slideDown 0.3s ease-out;
}

.notification-toast.warning {
  border-left-color: var(--danger);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-toast {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  width: auto;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

footer {
  text-align: center;
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  z-index: 999;
  width: auto;
  margin: 0;
}

.dark-mode-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}