.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 600px;
  width: 100%;
}

.form label {
  font-weight: 600;
}

.form input,
.form select,
.form textarea {
  padding: 12px;
  font-size: 16px; /* mobile safe */
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.form textarea {
  resize: vertical;
  min-height: 110px;
}

.form input[readonly] {
  background: #f1f1f1;
  cursor: not-allowed;
}

.dropzone {
  border: 2px dashed var(--primary);
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
}

.dropzone.drag-ok {
  background: #e8f5e9;
  border-color: #2e7d32;
}

.dropzone.drag-error {
  background: #fdecea;
  border-color: #c62828;
}

.preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.preview-item {
  position: relative;
}

.preview img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.remove-photo {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  cursor: pointer;
}

@media (max-width: 480px) {
  .preview img {
    width: 100px;
    height: 75px;
  }
}

.old-photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.old-photo-item {
  position: relative;
}

.photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

@media (max-width: 480px) {
  .photo-preview {
    width: 100px;
    height: 100px;
  }
}

/* ================= AUTH PAGES ================= */

.auth {
  flex: 1;                       /* ⬅️ KRITICKÉ */
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;

  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
}

.auth-links a {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--primary);
}


/* =================================================
   CREATE FORM
================================================= */

.create-form {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

/* celý řádek */
.create-form textarea,
.create-form .dropzone,
.create-form .preview,
.create-form button {
  grid-column: 1 / -1;
}

/* =================================================
   LABELS & INPUTS
================================================= */

.create-form label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
}

.create-form input,
.create-form select,
.create-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .95rem;
}

.create-form input:focus,
.create-form select:focus,
.create-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255,193,7,.15);
}

textarea {
  resize: vertical;
}

/* =================================================
   DROPZONE
================================================= */

.dropzone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.dropzone:hover {
  background: rgba(255,193,7,.08);
}

.dropzone.dragover {
  background: rgba(255,193,7,.15);
  border-color: #e6a900;
}

/* =================================================
   IMAGE PREVIEW
================================================= */

.preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.preview img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* =================================================
   SUBMIT
================================================= */

.create-form button {
  justify-self: flex-start;
  margin-top: 10px;
}

/* =================================================
   MOBILE
================================================= */

@media (max-width: 640px) {
  .create-form {
    grid-template-columns: 1fr;
  }
}


/* ================= FORM SECTIONS ================= */

.create-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section h3 {
  margin-bottom: 6px;
}

/* 2 sloupce */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ================= OLD PHOTOS ================= */

.old-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.old-photo-item {
  position: relative;
  width: 120px;
  height: 90px;
}

.old-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.remove-old {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.65);
  color: white;
  cursor: pointer;
  font-size: 14px;
}

/* ================= FORM ACTIONS ================= */

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .form-actions {
    flex-direction: column;
  }
}

/* =========================
   MODERNÍ EDIT FORM
========================= */

.form-card {
  background: var(--bg-card, #fffdf6);
  border-radius: 14px;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.form-section {
  margin-bottom: 2.5rem;
}

.form-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

/* ================= GRID ================= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem 1.6rem;
}

.form-grid .grid-span-2 {
  grid-column: span 2;
}

/* ================= INPUTS ================= */

.form-card label {
  display: block;
  font-weight: 500;
  margin-bottom: .3rem;
}

.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: 8px;
  border: 1px solid #d6d2c4;
  font-size: .95rem;
  background: #fff;
}

.form-card textarea {
  resize: vertical;
}

/* ================= FOTKY ================= */

.old-photos-grid,
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .8rem;
}

.old-photo-item {
  position: relative;
}

.photo-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.remove-old {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

/* ================= DROPZONE ================= */

.dropzone {
  margin-top: 1rem;
  padding: 1.5rem;
  border: 2px dashed #f2b233;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  background: #fffaf0;
  font-weight: 500;
}

/* ================= SUBMIT ================= */

.form-actions {
  margin-top: 2rem;
  text-align: right;
}
