.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 42px;
  font: inherit;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #07111b;
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button.danger {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffd9d9;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(112, 214, 255, 0.13);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
}

form {
  width: 100%;
}

.raid-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  gap: 18px;
}

.field-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(9, 16, 27, 0.7);
  color: var(--text);
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
}

select option {
  background: var(--panel-alt);
  color: var(--text);
}

select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23edf2ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

textarea {
  resize: vertical;
  min-height: 200px;
}

.upload-area-wrap {
  display: grid;
  gap: 8px;
}

.upload-dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 120px;
  padding: 20px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: rgba(9, 16, 27, 0.7);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover,
.upload-dropzone:focus-visible {
  border-color: var(--primary);
  background: rgba(112, 214, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-text {
  color: var(--text);
  font-weight: 700;
}

.upload-subtext,
.upload-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-status.success {
  color: var(--success);
}

.app-dialog[hidden] {
  display: none;
}

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.app-dialog-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.app-dialog-message {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
}

.flash.success {
  background: rgba(122, 229, 130, 0.12);
  border-color: rgba(122, 229, 130, 0.3);
  color: #dfffe2;
}

.flash.error {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.25);
  color: #ffe4e4;
}
