.layout {
  display: flex;
  height: calc(100vh - 100px);
}

.main {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  position: relative;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--gold-rgb), 0.2) transparent;
}

.main::-webkit-scrollbar {
  width: 6px;
}

.main::-webkit-scrollbar-track {
  background: transparent;
}

.main::-webkit-scrollbar-thumb {
  background: rgba(var(--gold-rgb), 0.2);
  border-radius: 3px;
}

.main::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--gold-rgb), 0.35);
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .main {
    flex: 1;
    padding-right: 0;
  }

  .header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .campaignName {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    order: -1;
  }

  .addBtn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.backLink {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.backLink:hover {
  color: var(--gold);
}

.campaignName {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.4);
}

.headerBtns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fogBtn {
  padding: 0.4rem 0.5rem;
  background: none;
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.5;
  transition:
    opacity 0.15s,
    border-color 0.15s;
}

.fogBtn:hover {
  opacity: 0.8;
  border-color: rgba(var(--gold-rgb), 0.4);
}

.fogBtnActive {
  opacity: 1;
  border-color: rgba(var(--gold-rgb), 0.5);
  background: rgba(var(--gold-rgb), 0.1);
}

.addBtn {
  padding: 0.5rem 1rem;
  background: var(--btn-gold-bg);
  color: var(--btn-active-text);
  border: none;
  border-radius: 4px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow:
    0 2px 4px rgba(var(--shadow-rgb), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 1px rgba(var(--shadow-rgb), 0.2);
}

.addBtn:hover {
  background: linear-gradient(
    180deg,
    var(--gold-bright),
    var(--gold-hover) 40%,
    var(--gold)
  );
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: 3rem 0;
  font-style: italic;
  grid-column: 1 / -1;
}

.createModal {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.createForm {
  background-color: var(--bg-modal);
  background-image: var(--texture-surface), var(--texture-speckle);
  background-size:
    256px 256px,
    128px 128px;
  background-repeat: repeat, repeat;
  border: 2px solid rgba(var(--gold-rgb), 0.3);
  border-radius: 4px;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow:
    0 8px 40px rgba(var(--shadow-rgb), 0.7),
    0 2px 8px rgba(var(--shadow-rgb), 0.5),
    inset 0 1px 0 rgba(var(--gold-rgb), 0.1),
    inset 0 0 60px rgba(var(--shadow-rgb), 0.2);
}

.createTitle {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.3);
}

.formField {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.formLabel {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.formInput {
  padding: 0.5rem 0.75rem;
  background: var(--bg-inset);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Alegreya", Georgia, serif;
}

.formInput:focus {
  outline: none;
  border-color: var(--gold);
}

.formSelect {
  padding: 0.5rem 0.75rem;
  background: var(--bg-inset);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Alegreya", Georgia, serif;
}

.formSelect option {
  background: var(--bg-modal);
  color: var(--text-primary);
}

.formActions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.formBtn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.formBtnPrimary {
  background: var(--btn-gold-bg);
  color: var(--btn-active-text);
  border: none;
  font-family: "Cinzel", Georgia, serif;
  box-shadow:
    0 2px 4px rgba(var(--shadow-rgb), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 1px rgba(var(--shadow-rgb), 0.2);
}

.formBtnPrimary:hover {
  background: linear-gradient(
    180deg,
    var(--gold-bright),
    var(--gold-hover) 40%,
    var(--gold)
  );
}

.formBtnSecondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
}

.formBtnSecondary:hover {
  border-color: rgba(var(--gold-rgb), 0.4);
  color: var(--text-primary);
}
