.container {
  min-height: 100vh;
  background: radial-gradient(circle at top right, hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08), transparent 45%),
              var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  transition: background var(--transition-slow);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logoArea {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logoText {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.navLink {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--foreground);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.navLinkActive {
  opacity: 1;
  color: var(--primary);
  font-weight: var(--weight-semibold);
}

.logoutBtn {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(0, 75%, 60%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.logoutBtn:hover {
  opacity: 1;
}

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.titleSection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.actions {
  display: flex;
  gap: var(--space-4);
}

.btnPrimary {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btnPrimary:active {
  transform: translateY(0);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

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

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

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.cardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.cardCode {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  color: var(--primary);
  background-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.badgeDRAFT {
  background-color: hsl(40, 90%, 93%);
  color: hsl(40, 90%, 30%);
}

:global([data-theme='dark']) .badgeDRAFT {
  background-color: hsla(40, 90%, 50%, 0.15);
  color: hsl(40, 90%, 60%);
}

.badgeACTIVE {
  background-color: hsl(120, 80%, 93%);
  color: hsl(120, 80%, 30%);
}

:global([data-theme='dark']) .badgeACTIVE {
  background-color: hsla(120, 80%, 50%, 0.15);
  color: hsl(120, 80%, 50%);
}

.badgeINACTIVE {
  background-color: hsl(0, 0%, 90%);
  color: hsl(0, 0%, 35%);
}

:global([data-theme='dark']) .badgeINACTIVE {
  background-color: hsla(0, 0%, 50%, 0.15);
  color: hsl(0, 0%, 65%);
}

.cardTitle {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}

.cardMeta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-bottom: var(--space-6);
}

.metaItem {
  display: flex;
  justify-content: space-between;
}

.metaValue {
  font-weight: var(--weight-semibold);
}

.cardFooter {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}

.btnSecondary {
  flex: 1;
  padding: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  text-align: center;
}

.btnSecondary:hover {
  background-color: var(--border);
  border-color: var(--border);
}

.btnSecondary:active {
  transform: translateY(0);
}

/* Modal and Form styling */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn var(--transition-fast) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 500px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-height: 90vh;
  overflow-y: auto;
}

.modalTitle {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--foreground);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.15);
}

.errorText {
  color: hsl(0, 85%, 60%);
  background-color: hsl(0, 85%, 97%);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  border: 1px solid hsl(0, 85%, 90%);
}

:global([data-theme='dark']) .errorText {
  background-color: hsla(0, 85%, 20%, 0.15);
  border-color: hsla(0, 85%, 50%, 0.3);
  color: hsl(0, 85%, 60%);
}

.formActions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.loading {
  text-align: center;
  padding: var(--space-8);
  opacity: 0.8;
}

