.field-error {
  display: none;
  width: 100%;
  margin-top: 0;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.35;
}

.lg-field > .field-error,
.ct-field > .field-error {
  margin-top: -2px;
}

.lg-input-wrap > .field-error,
.ct-input-wrap > .field-error {
  display: none !important;
}

.field-error.is-visible,
label.error.field-error,
span.error.field-error,
.field-error.error {
  display: block;
  animation: field-error-pop 180ms ease-out;
}

.lg-input-wrap > .field-error.is-visible,
.lg-input-wrap > .field-error.error,
.ct-input-wrap > .field-error.is-visible,
.ct-input-wrap > .field-error.error {
  display: none !important;
}

@keyframes field-error-pop {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-soft) !important;
}

.lg-check.is-invalid .lg-check-box,
.ct-check.is-invalid .ct-check-box {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-soft) !important;
}


#toast-container {
  z-index: 9999;
}

#toast-container.toast-top-right {
  top: calc(var(--nav-h) + 12px) !important;
  right: 16px !important;
}

#toast-container > div,
#toast-container > div.toast {
  position: relative;
  width: 350px;
  max-width: calc(100vw - 28px);
  min-height: 60px;
  margin: 0 0 9px;
  overflow: hidden;
  padding: 12px 50px 12px 52px;
  border: 0;
  border-radius: 14px;
  background-image: none !important;
  color: #FFFFFF;
  box-shadow: 0 18px 42px rgba(6, 15, 18, 0.24);
  font-family: var(--font);
  line-height: 1.35;
  opacity: 1 !important;
}

#toast-container > .toast-success {
  background-color: #16794B !important;
}

#toast-container > .toast-error {
  background-color: #B42318 !important;
}

#toast-container > .toast-warning {
  background-color: #A15C07 !important;
}

#toast-container > .toast-info {
  background-color: #175CD3 !important;
}

#toast-container > div::before,
#toast-container > div::after {
  display: none;
}

.toast-title {
  margin: 0 0 2px;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.toast-message {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  line-height: 1.35;
  word-wrap: break-word;
}

.toast-message .toast-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  transform: translateY(-50%);
}

.toast-message .toast-icon i {
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.toast-message .toast-text {
  display: block;
  word-break: break-word;
}

.toast-message a,
.toast-message label {
  color: inherit;
}

.toast-close-button {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  font-weight: 400;
  text-shadow: none;
  cursor: pointer;
  opacity: 1;
  transform: translateY(-50%);
  transition: color 150ms ease, background 150ms ease;
}

.toast-close-button:hover,
.toast-close-button:focus {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.toast-close-button i {
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.toast-progress,
#toast-container > .toast-success .toast-progress,
#toast-container > .toast-error .toast-progress,
#toast-container > .toast-warning .toast-progress,
#toast-container > .toast-info .toast-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.74) !important;
  opacity: 1;
}

@media (max-width: 640px) {
  #toast-container.toast-top-right {
    top: calc(var(--nav-h) + 8px) !important;
    right: 10px !important;
    left: 10px !important;
  }

  #toast-container > div {
    width: auto;
    max-width: none;
  }
}

.vid-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 32px 28px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  background: var(--bg-4);
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
  text-align: center;
}

.vid-dropzone::after {
  display: none;
}

.vid-dropzone:hover {
  border-color: var(--lime);
  background: var(--lime-soft);
  transform: translateY(-1px);
}

.vid-dropzone.is-dragging {
  border-color: var(--lime);
  background: var(--lime-soft-2);
  box-shadow: 0 0 0 4px var(--lime-soft);
  transform: translateY(-2px);
}

.vid-dropzone.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10) !important;
}

.vid-dropzone-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 460px;
}

.vid-dropzone.has-file .vid-dropzone-content {
  display: none;
}

.vid-dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--lime-soft);
  border: 1px solid rgba(var(--lime-rgb), 0.24);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 6px;
  box-shadow: none;
}

@keyframes vid-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.vid-dropzone-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.vid-dropzone-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.vid-dropzone-desc strong {
  color: var(--lime, var(--lime));
  font-weight: 600;
}

.vid-dropzone-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.vid-dropzone-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vid-dropzone-meta i {
  color: var(--lime, var(--lime));
}

.vid-dropzone-file {
  display: none;
  position: relative;
  z-index: 1;
  width: 100%;
  align-items: center;
  gap: 18px;
  padding: 4px 8px;
  text-align: left;
}

.vid-dropzone.has-file .vid-dropzone-file {
  display: flex;
}

.vid-file-preview {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-3);
}

.vid-file-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  border: 1px solid rgba(var(--amber-rgb), 0.35);
  color: var(--amber, var(--amber));
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
}

.vid-dropzone.has-file .vid-file-icon.is-active {
  display: flex;
}

.vid-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.vid-file-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vid-file-size {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.vid-file-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(var(--lime-rgb), 0.16);
  color: var(--lime);
  border: 1px solid rgba(var(--lime-rgb), 0.30);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vid-file-clear {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
  font-size: 18px;
}

.vid-file-clear:hover {
  background: rgba(239, 68, 68, 0.10);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
  transform: scale(1.05);
}

.vid-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0;
}

.vid-form-card {
  padding: 36px 32px 32px;
}

.vid-form-card .lg-form-title {
  font-size: 1.6rem;
}

.vid-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.vid-actions .btn {
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .vid-dropzone {
    min-height: 240px;
    padding: 28px 18px;
    border-radius: 18px;
  }
  .vid-dropzone-title { font-size: 1.15rem; }
  .vid-dropzone-icon { width: 64px; height: 64px; font-size: 30px; }
  .vid-dropzone-file { flex-direction: column; align-items: flex-start; }
  .vid-file-preview, .vid-file-icon { width: 100%; height: 140px; }
  .vid-file-clear { align-self: flex-end; }
}
