*, *::before, *::after { box-sizing: border-box; }

/* Auth screen */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  width: 360px;
  background: #1a1a1a;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 32px 28px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  font-size: 12px;
  padding: 8px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.auth-tab.active {
  background: rgba(255,255,255,0.08);
  color: #e8e8e8;
}

.auth-form-inner .form-group {
  margin-bottom: 10px;
}

.auth-error {
  font-size: 12px;
  color: rgba(220,80,80,0.85);
  margin-top: 10px;
  display: none;
}

/* Admin wrap */
.admin-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-title {
  font-size: 18px;
  font-weight: 500;
  color: #e8e8e8;
  margin-bottom: 4px;
}

.admin-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* Upload mode toggle */
.upload-mode-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.mode-btn {
  font-size: 12px;
  padding: 7px 16px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-btn.active {
  background: rgba(255,255,255,0.08);
  color: #e8e8e8;
}

/* Upload area */
.upload-area {
  border: 0.5px dashed rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.03);
}

.upload-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

.upload-label {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* Selected file row */
.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  background: #1a1a1a;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
}

.selected-file-name {
  font-size: 13px;
  color: #e8e8e8;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-file-size {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

.btn-remove {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  white-space: nowrap;
}

.btn-remove:hover {
  color: rgba(220,80,80,0.8);
}

/* Extraction preview */
.extract-preview {
  margin-top: 12px;
  background: #1a1a1a;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px 16px;
}

.extract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.extract-label {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.extract-value {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  font-family: monospace;
}

.extract-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(96,213,247,0.12);
  color: #60d5f7;
  border: 0.5px solid rgba(96,213,247,0.25);
}

.extract-error {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(220,80,80,0.85);
  background: rgba(220,80,80,0.08);
  border: 0.5px solid rgba(220,80,80,0.2);
  border-radius: 8px;
  padding: 10px 14px;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

input, textarea, select {
  width: 100%;
  background: #1a1a1a;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #e8e8e8;
  font-size: 13px;
  font-family: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(255,255,255,0.3);
}

input::placeholder, textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.3)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

select option {
  background: #1a1a1a;
  color: #e8e8e8;
}

textarea {
  resize: vertical;
  min-height: 72px;
}

/* Input with prefix */
.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

.input-prefix-wrap input {
  padding-left: 22px;
}

.field-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  margin-top: 2px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: #1a1a1a;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

input[type="checkbox"]:checked {
  background: #60d5f7;
  border-color: #60d5f7;
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0e0e0e;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.featured-indicator {
  font-size: 11px;
  color: #60d5f7;
  margin-left: 6px;
}

/* License pane */
.license-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.license-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  flex-wrap: wrap;
}

.license-row .checkbox-label:first-child {
  min-width: 130px;
  flex-shrink: 0;
}

.license-price {
  width: 100px;
  flex-shrink: 0;
}

.license-price input {
  font-size: 12px;
  padding: 6px 8px 6px 20px;
}

.license-price input:disabled {
  opacity: 0.3;
}

.negotiate-label {
  font-size: 11px !important;
  color: rgba(255,255,255,0.35) !important;
  margin-left: auto;
}

.negotiate-label span {
  font-size: 11px;
}

/* Upload preview */
.upload-preview {
  margin-top: 20px;
}

.upload-preview .form-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  display: block;
}

.preview-canvas-wrap {
  width: 360px;
  height: 240px;
  background: #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.preview-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.preview-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* Current thumbnail */
.current-thumb-wrap {
  margin-top: 16px;
}

.current-thumb-wrap .form-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  display: block;
}

.current-thumb-img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  border: 0.5px solid rgba(255,255,255,0.1);
  display: block;
  margin-bottom: 6px;
}

/* Upload actions */
.upload-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-status {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.upload-status.error {
  color: rgba(220,80,80,0.85);
}

.upload-status.success {
  color: rgba(80,200,140,0.8);
}

/* Divider */
.divider {
  height: 0.5px;
  background: rgba(255,255,255,0.08);
  margin: 32px 0;
}

/* Splat list */
.splat-list {
  display: flex;
  flex-direction: column;
}

.splat-list-title {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.splat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.07);
}

.splat-row:last-child {
  border-bottom: none;
}

.splat-row-title {
  font-size: 13px;
  color: #e8e8e8;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.splat-row-tags {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  border: 0.5px solid rgba(255,255,255,0.1);
}

.tag-free { background: rgba(80,200,140,0.1); color: rgba(80,200,140,0.7); border-color: rgba(80,200,140,0.2); }
.tag-price { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15); font-weight: 500; }
.tag-personal { background: rgba(120,100,255,0.1); color: rgba(150,130,255,0.8); border-color: rgba(120,100,255,0.2); }
.tag-commercial { background: rgba(255,160,60,0.1); color: rgba(255,170,80,0.8); border-color: rgba(255,160,60,0.2); }

.splat-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-edit {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  background: none;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-edit:hover {
  color: rgba(96,213,247,0.8);
  border-color: rgba(96,213,247,0.3);
}

.btn-backup {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  background: none;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-backup:hover {
  color: rgba(80,200,140,0.8);
  border-color: rgba(80,200,140,0.3);
}

.btn-backup:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-delete {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  background: none;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-delete:hover {
  color: rgba(220,80,80,0.8);
  border-color: rgba(220,80,80,0.3);
}

.splat-list-empty {
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  padding: 20px 0;
}
