:root {
  --navy:        #0B1E3D;
  --navy-mid:    #162f5c;
  --navy-soft:   #1e3d6e;
  --gold:        #C5A059;
  --gold-light:  #d9b878;
  --gold-pale:   #f7f0e2;
  --gold-bg:     #fdf8ef;
  --bg:          #f4f6f9;
  --surface:     #ffffff;
  --line:        #e4e9f2;
  --text:        #0f1f38;
  --muted:       #6b7a95;
  --danger:      #e05263;
  --success:     #2fa87a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container.shell { width: min(1120px, 92%); margin: 0 auto; }
body > .container.shell { flex: 1; display: flex; width: min(1120px, 92%); }

.iframe-main .container.shell {
  width: 100%;
  max-width: none;
  padding: 0 12px;
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
}

.topbar .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand { color: var(--gold); font-weight: 700; text-decoration: none; letter-spacing: .3px; font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: rgba(255,255,255,.75); text-decoration: none; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--gold); }
.nav-links span { color: #fff; font-weight: 600; }

main { padding: 28px 0 48px; flex: 1; width: 100%; }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(11,30,61,.08);
}

.muted { color: var(--muted); }

/* ── Butonlar (genel) ── */
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, color .18s;
}
.btn-primary:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-link {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}
.btn-link:hover { color: var(--gold); }

/* ── Form (Create.cshtml genel) ── */
.form-grid { display: grid; gap: 12px; margin-top: 10px; }

input, textarea {
  width: 100%;
  margin-top: 6px;
  background: #f9fafc;
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
}
input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,160,89,.15);
}

.alert { margin-top: 12px; border-radius: 12px; padding: 10px 12px; font-weight: 500; }
.alert.err { background: #fff1f3; border: 1px solid #ffd3da; color: #b4233a; }
.alert.ok  { background: #edfdf6; border: 1px solid #c5f0dc; color: #177f5d; }

.field-validation { display: block; margin-top: 4px; color: #dc2626; font-size: .86rem; font-weight: 600; }
.field-validation-valid { display: none; }
.validation-summary-errors, .validation-summary-valid { color: #dc2626; }

/* ── Listing page ── */
.listing-page {
  background: var(--bg);
  border-radius: 16px;
  padding: 22px;
}

.listing-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Filtre alanı ── */
.filter-box {
  background: var(--navy);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(11,30,61,.18);
  position: sticky;
  top: 76px;
}

.filter-box-header {
  background: var(--gold);
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-box-header h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.filter-box-header .filter-icon {
  font-size: 1rem;
  line-height: 1;
}

.filter-box-body { padding: 16px 18px 20px; }

.filter-section-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.filter-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(197,160,89,.2);
  background: rgba(255,255,255,.04);
  transition: background .15s, border-color .15s;
}
.filter-option:hover { background: rgba(197,160,89,.1); border-color: rgba(197,160,89,.4); }
.filter-option:last-child { margin-bottom: 0; }

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
}

.filter-option-label {
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  flex: 1;
}

.filter-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
}
.filter-badge.lost  { background: var(--danger); }
.filter-badge.found { background: var(--success); }

/* ── Latest head ── */
.latest-title { margin: 0 0 12px; color: var(--navy); font-size: 1.1rem; font-weight: 700; }
.latest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.latest-head .latest-title { margin: 0; }

/* ── Pet grid ── */
.pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.pet-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(11,30,61,.08);
  transition: transform .18s, box-shadow .18s;
}
.pet-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11,30,61,.13); }

.image-wrap { position: relative; }

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.status-badge.found { background: var(--success); }

.listing-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e8ecf2;
}

.pet-content { padding: 14px; }
.pet-content h3 { margin: 0 0 4px; color: var(--navy); font-size: .98rem; }
.breed   { margin: 0; color: var(--muted); font-size: .85rem; }
.location{ color: #53627d; margin: 10px 0; font-size: .88rem; }

.pet-actions { display: grid; grid-template-columns: 1fr 40px; gap: 8px; }

.seen-btn {
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
  font-size: .82rem;
  padding: 9px 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.seen-btn:hover { background: var(--gold); color: var(--navy); }

.info-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fb;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.info-btn:hover { background: var(--gold-pale); color: var(--navy); border-color: var(--gold); }

/* ── FAB ── */
.fab-add {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  background: var(--navy);
  color: var(--gold);
  box-shadow: 0 8px 24px rgba(11,30,61,.35);
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.fab-add:hover {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 10px 28px rgba(197,160,89,.4);
}

/* ── Footer ── */
.footer {
  border-top: 2px solid var(--gold);
  color: rgba(255,255,255,.6);
  padding: 16px 0 24px;
  margin-top: auto;
  background: var(--navy);
}

.card-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

@media (max-width: 900px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filter-box { position: static; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 61, .6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 28px 80px rgba(11,30,61,.28);
  animation: slideUp .22s cubic-bezier(.22,1,.36,1);
  border-top: 4px solid var(--gold);
}

.modal-box--sm { max-width: 420px; }

@keyframes slideUp { from { transform: translateY(28px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal-head-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px 0;
  margin-bottom: 16px;
}

.modal-head-icon {
  font-size: 1.5rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-title    { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.modal-subtitle { margin: 3px 0 0; font-size: .8rem; color: var(--muted); }

.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--gold-pale); color: var(--navy); }

.modal-error-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .85rem;
  margin: 0 24px 14px;
}
.modal-error-bar::before { content: "⚠"; font-size: 1rem; }

/* Upload zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed var(--gold-light);
  border-radius: 13px;
  padding: 22px 16px;
  cursor: pointer;
  background: var(--gold-bg);
  transition: border-color .2s, background .2s;
  margin: 0 24px 16px;
  position: relative;
  overflow: hidden;
}
.upload-zone:hover { border-color: var(--gold); background: var(--gold-pale); }
.upload-icon  { font-size: 1.8rem; }
.upload-text  { font-size: .88rem; font-weight: 600; color: var(--navy); }
.upload-hint  { font-size: .76rem; color: var(--muted); }
.upload-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  opacity: .35;
}

/* Form alanları */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 24px;
}
.form-row.three-col { grid-template-columns: 1fr 1fr 1fr; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  padding: 0 24px;
}
.form-row .field-group,
.form-row.three-col .field-group { padding: 0; margin-bottom: 0; }
.field-group:last-child { margin-bottom: 0; }

.field-label { font-size: .77rem; font-weight: 700; color: var(--navy); letter-spacing: .03em; text-transform: uppercase; }
.req { color: var(--gold); }

.field-input {
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: .9rem;
  color: var(--text);
  background: #fafbfc;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  margin: 0;
}
.field-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,160,89,.15);
  background: #fff;
}
.field-textarea { resize: vertical; min-height: 72px; }

/* Modal butonları */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.btn-ghost {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 9px 20px;
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-ghost:hover { background: #f3f4f6; color: var(--navy); border-color: #c9cdd5; }

.btn-submit {
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 9px;
  padding: 9px 24px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, color .18s;
}
.btn-submit:hover   { background: var(--gold); color: var(--navy); }
.btn-submit:disabled{ opacity: .6; cursor: not-allowed; }

@media (max-width: 520px) {
  .form-row, .form-row.three-col { grid-template-columns: 1fr; padding: 0 16px; }
  .modal-box { border-radius: 16px; }
  .field-group { padding: 0 16px; }
  .upload-zone, .modal-error-bar { margin-left: 16px; margin-right: 16px; }
  .modal-head-bar { padding: 18px 16px 0; }
  .modal-actions { padding: 14px 16px 18px; }
}
