.field-error {
  display: none;
  width: 100%;
  margin-top: 0;
  color: #ef4444;
  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: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}

.lg-check.is-invalid .lg-check-box,
.ct-check.is-invalid .ct-check-box {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}


#toast-container { z-index: 9999; }
#toast-container.toast-top-right {
  top: 18px !important;
  right: 18px !important;
}

#toast-container > div {
  opacity: 1 !important;
  background-image: none !important;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 14px 38px 14px 50px;
  border-radius: 10px;
  background-color: #1A1C20;
  color: #f5f6f8;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  margin: 0 0 10px 0;
  overflow: hidden;
}

#toast-container > div.toast,
#toast-container > .toast-success,
#toast-container > .toast-error,
#toast-container > .toast-info,
#toast-container > .toast-warning {
  background-image: none !important;
}

#toast-container > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #5082ff;
}

.toast-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 2px;
  color: #f5f6f8;
}

.toast-message {
  font-size: 13px;
  color: rgba(245, 246, 248, 0.78);
  word-wrap: break-word;
  display: block;
}

.toast-message .toast-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5082ff;
}

.toast-message .toast-icon i {
  font-style: normal;
  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;
  right: 10px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  color: rgba(245, 246, 248, 0.55);
  text-shadow: none;
  opacity: 1;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.toast-close-button:hover,
.toast-close-button:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.toast-close-button i {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
}

.toast-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.14) !important;
  opacity: 1;
}
[data-theme="light"] .toast-progress {
  background: rgba(10, 11, 13, 0.10) !important;
}


#toast-container > .toast-success::before { background: #22d982; }
#toast-container > .toast-success .toast-icon { color: #22d982; }

#toast-container > .toast-error::before { background: #ff4757; }
#toast-container > .toast-error .toast-icon { color: #ff4757; }

#toast-container > .toast-warning::before { background: #ffb020; }
#toast-container > .toast-warning .toast-icon { color: #ffb020; }

#toast-container > .toast-info::before { background: #5082ff; }
#toast-container > .toast-info .toast-icon { color: #5082ff; }


[data-theme="light"] #toast-container > div {
  background-color: #ffffff;
  border-color: rgba(10, 11, 13, 0.08);
  box-shadow: 0 10px 30px rgba(10, 11, 13, 0.10);
}
[data-theme="light"] .toast-title { color: #0a0b0d; }
[data-theme="light"] .toast-message { color: rgba(10, 11, 13, 0.70); }
[data-theme="light"] .toast-close-button { color: rgba(10, 11, 13, 0.50); }
[data-theme="light"] .toast-close-button:hover {
  color: #0a0b0d;
  background: rgba(10, 11, 13, 0.06);
}

[data-theme="light"] #toast-container > .toast-success::before { background: #0F9D58; }
[data-theme="light"] #toast-container > .toast-success .toast-icon { color: #0F9D58; }
[data-theme="light"] #toast-container > .toast-error::before { background: #D32F3B; }
[data-theme="light"] #toast-container > .toast-error .toast-icon { color: #D32F3B; }
[data-theme="light"] #toast-container > .toast-warning::before { background: #A86700; }
[data-theme="light"] #toast-container > .toast-warning .toast-icon { color: #A86700; }
[data-theme="light"] #toast-container > .toast-info::before { background: #2A56D8; }
[data-theme="light"] #toast-container > .toast-info .toast-icon { color: #2A56D8; }

@media (max-width: 640px) {
  #toast-container.toast-top-right {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
  }
  #toast-container > div { width: auto; }
}

.vid-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 36px 28px;
  border-radius: 22px;
  border: 2px dashed var(--border, #25272D);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(197, 255, 69, 0.07), transparent 70%),
    var(--bg-2, #0F1013);
  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 {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 245, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 247, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 80%);
  opacity: 0.6;
}

[data-theme="light"] .vid-dropzone::after {
  background-image:
    linear-gradient(rgba(10, 11, 13, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 11, 13, 0.05) 1px, transparent 1px);
}

.vid-dropzone:hover {
  border-color: var(--lime, #C5FF45);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(197, 255, 69, 0.14), transparent 70%),
    var(--bg-2, #0F1013);
  transform: translateY(-1px);
}

.vid-dropzone.is-dragging {
  border-color: var(--lime, #C5FF45);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(197, 255, 69, 0.20), transparent 70%),
    var(--bg-2, #0F1013);
  box-shadow: 0 0 0 6px rgba(197, 255, 69, 0.10), 0 18px 60px rgba(197, 255, 69, 0.08);
  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: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(197, 255, 69, 0.20), rgba(197, 255, 69, 0.05));
  border: 1px solid rgba(197, 255, 69, 0.30);
  color: var(--lime, #C5FF45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 6px;
  box-shadow: 0 12px 36px rgba(197, 255, 69, 0.16);
  animation: vid-bob 3s ease-in-out infinite;
}

@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, #f5f6f8);
  margin: 0;
}

.vid-dropzone-desc {
  font-size: 0.95rem;
  color: var(--text-secondary, #b3b6bd);
  margin: 0;
}

.vid-dropzone-desc strong {
  color: var(--lime, #C5FF45);
  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-pill, 999px);
  background: var(--bg-3, #16181C);
  border: 1px solid var(--border, #25272D);
  color: var(--text-secondary, #b3b6bd);
  font-family: var(--mono, monospace);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vid-dropzone-meta i {
  color: var(--lime, #C5FF45);
}

.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: 14px;
  object-fit: cover;
  border: 1px solid var(--border, #25272D);
  background: var(--bg-3, #16181C);
}

.vid-file-icon {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 176, 32, 0.20), rgba(255, 176, 32, 0.05));
  border: 1px solid rgba(255, 176, 32, 0.35);
  color: var(--amber, #FFB020);
  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, #f5f6f8);
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vid-file-size {
  font-family: var(--mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary, #b3b6bd);
}

.vid-file-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(95, 168, 11, 0.16);
  color: var(--lime, #C5FF45);
  border: 1px solid rgba(197, 255, 69, 0.30);
  font-family: var(--mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vid-file-clear {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-3, #16181C);
  border: 1px solid var(--border, #25272D);
  color: var(--text-secondary, #b3b6bd);
  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; }
}
