/* Miela POD paneli -- elle yazılmış, çerçeve yok.
   Tek vurgu rengi yeşil; amber ve kırmızı yalnızca durum rozetlerinde. */

:root {
  --bg:        #FAF6EE;
  --surface:   #FFFFFF;
  --green-900: #2E5545;
  --green-600: #4A7C64;
  --green-200: #C7DFCB;
  --green-50:  #EAF2E9;
  --text:      #23231F;
  --muted:     #6E6B60;
  --border:    #E6E0D2;
  --warn:      #C08A2E;
  --error:     #A8462F;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 35, 31, .04), 0 4px 12px rgba(35, 35, 31, .03);
  --shadow-lift: 0 2px 4px rgba(35, 35, 31, .06), 0 12px 28px rgba(35, 35, 31, .07);

  /* Tipografik ölçek -- her şey 14px değil */
  --t-page:    1.75rem;   /* sayfa başlığı */
  --t-section: 1.125rem;  /* bölüm başlığı */
  --t-body:    0.9375rem; /* gövde */
  --t-caption: 0.8125rem; /* açıklama */
  --t-micro:   0.6875rem; /* rozet */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--t-body)/1.6 ui-sans-serif, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern", "liga";
}

a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--green-900); text-decoration: underline; }

/* ---------- üst çubuk ---------- */

.ust {
  background: var(--green-900);
  color: #FFF;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 20;
}
.ust-ic {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  min-height: 58px;
}
.marka {
  font-size: 1rem; font-weight: 650; letter-spacing: .01em;
  color: #FFF; white-space: nowrap;
}
.marka:hover { text-decoration: none; color: #FFF; }
.nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.nav a {
  color: rgba(255,255,255,.78);
  padding: .45rem .8rem; border-radius: 7px;
  font-size: var(--t-body); font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.10); color: #FFF; text-decoration: none; }
.nav a.aktif { background: rgba(255,255,255,.16); color: #FFF; }
.cikis-form button {
  background: none; border: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.85); padding: .35rem .75rem;
  border-radius: 7px; cursor: pointer; font-size: var(--t-caption);
  font-family: inherit;
}
.cikis-form button:hover { background: rgba(255,255,255,.12); color: #FFF; }

/* ---------- sayfa iskeleti ---------- */

.sayfa { max-width: 1240px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.sayfa-basi { margin-bottom: 2rem; }
h1 {
  font-size: var(--t-page); font-weight: 660; letter-spacing: -.015em;
  margin: 0 0 .35rem; line-height: 1.2;
}
.altbaslik { color: var(--muted); font-size: var(--t-body); margin: 0; }

h2 {
  font-size: var(--t-section); font-weight: 620; letter-spacing: -.008em;
  margin: 0 0 1rem;
}
.caption { font-size: var(--t-caption); color: var(--muted); }

/* ---------- kart ---------- */

.kart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kart-ic { padding: 1.5rem; }
.kart + .kart { margin-top: 1.25rem; }

/* ---------- araç çubuğu / filtreler ---------- */

.araclar {
  display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.alan { display: flex; flex-direction: column; gap: .3rem; }
.alan label {
  font-size: var(--t-caption); color: var(--muted); font-weight: 550;
}
select, input[type="password"], input[type="text"] {
  font: inherit; font-size: var(--t-body);
  padding: .5rem .7rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  min-width: 170px;
}
select:focus, input:focus {
  outline: 2px solid var(--green-200); outline-offset: 1px;
  border-color: var(--green-600);
}
.araclar-sag { margin-left: auto; display: flex; gap: .6rem; align-items: center; }

/* ---------- düğmeler ---------- */

.btn {
  font: inherit; font-size: var(--t-body); font-weight: 550;
  padding: .55rem 1.1rem; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer;
  background: var(--green-900); color: #FFF;
  transition: background .12s ease, box-shadow .12s ease;
}
.btn:hover:not(:disabled) { background: #26463a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ikincil { background: var(--surface); color: var(--green-900); border-color: var(--border); }
.btn-ikincil:hover:not(:disabled) { background: var(--green-50); border-color: var(--green-200); }
.btn-tehlike { background: var(--surface); color: var(--error); border-color: #E8CDC5; }
.btn-tehlike:hover:not(:disabled) { background: #FBF1EE; }
.btn-kucuk { padding: .35rem .7rem; font-size: var(--t-caption); }

/* ---------- rozetler ---------- */

.rozet {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: var(--t-micro); font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.rozet-ok    { background: var(--green-50);  color: var(--green-900); }
.rozet-uyari { background: #FBF2E0;          color: var(--warn); }
.rozet-hata  { background: #F8EBE7;          color: var(--error); }
.rozet-notr  { background: #F2EFE6;          color: var(--muted); }

.nokta { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- tasarım ızgarası (ekranın merkezi) ---------- */

.izgara {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.tasarim {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
  position: relative;
}
.tasarim:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.tasarim.secili { border-color: var(--green-600); box-shadow: 0 0 0 2px var(--green-200), var(--shadow-lift); }

.tasarim input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }

.tasarim-gorsel {
  aspect-ratio: 1; background: var(--bg);
  display: block; width: 100%; object-fit: contain;
  border-bottom: 1px solid var(--border);
}
.tasarim-alt { padding: .85rem 1rem 1rem; }
.tasarim-ad {
  font-size: var(--t-body); font-weight: 570;
  margin: 0 0 .5rem; overflow-wrap: anywhere; line-height: 1.35;
}
.rozet-sira { display: flex; flex-wrap: wrap; gap: .3rem; }

.tik {
  position: absolute; top: .7rem; right: .7rem;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  color: transparent; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow);
}
.tasarim.secili .tik { background: var(--green-900); border-color: var(--green-900); color: #FFF; }

/* ---------- seçim şeridi ---------- */

.serit {
  position: sticky; bottom: 1.25rem; z-index: 15;
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.serit-sayi { font-weight: 620; }
.serit form { display: flex; gap: .75rem; align-items: center; margin-left: auto; flex-wrap: wrap; }

/* ---------- tablo ---------- */

.tablo-sarmal { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
thead th {
  text-align: left; font-size: var(--t-caption); font-weight: 620;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  padding: .65rem 1rem; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--green-50); }
td.hata-metni { color: var(--error); font-size: var(--t-caption); max-width: 340px; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8125rem; color: var(--muted);
}

/* ---------- ilerleme ---------- */

.ilerleme-cubuk {
  height: 8px; border-radius: 999px; background: var(--green-50);
  overflow: hidden; border: 1px solid var(--border);
}
.ilerleme-dolu {
  height: 100%; background: var(--green-600); border-radius: 999px;
  transition: width .3s ease;
}

.asama-sira { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.asama {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .04em;
  padding: .18rem .5rem; border-radius: 999px;
  background: #F2EFE6; color: var(--muted); font-weight: 620;
}
.asama.aktif { background: var(--green-900); color: #FFF; }
.asama.bitti { background: var(--green-50); color: var(--green-900); }

.kalem-sira { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.kalem {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--border);
}
.kalem:last-child { border-bottom: none; }
.kalem-ad { font-weight: 550; flex: 1; overflow-wrap: anywhere; }

/* ---------- kontrast swatch'ları ---------- */

.swatch-izgara {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .85rem;
}
.swatch {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--surface);
}
.swatch-renk { height: 56px; display: block; }
.swatch-alt { padding: .5rem .65rem .6rem; }
.swatch-ad { font-size: var(--t-caption); font-weight: 570; }
.swatch-sebep {
  font-size: var(--t-micro); color: var(--muted); line-height: 1.45;
  margin-top: .25rem;
}
.swatch.elenen { border-color: #E8CDC5; }
.swatch.incelenecek { border-color: #EEDDBA; }

.olcum-sira { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.olcum-etiket { font-size: var(--t-caption); color: var(--muted); }
.olcum-deger { font-size: 1.35rem; font-weight: 620; letter-spacing: -.01em; }

/* ---------- boş ve yükleniyor durumları ---------- */

.bos {
  text-align: center; padding: 4rem 2rem;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.bos-ikon {
  width: 44px; height: 44px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--green-50);
  display: grid; place-items: center; color: var(--green-600); font-size: 20px;
}
.bos h3 { font-size: var(--t-section); font-weight: 600; margin: 0 0 .4rem; }
.bos p { color: var(--muted); margin: 0 auto; max-width: 42ch; font-size: var(--t-body); }
.bos .btn { margin-top: 1.25rem; }

.iskelet {
  background: linear-gradient(90deg, var(--green-50) 25%, #F3F7F2 37%, var(--green-50) 63%);
  background-size: 400% 100%;
  animation: kayan 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes kayan { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.iskelet-kart { height: 264px; border-radius: var(--radius); }
.iskelet-satir { height: 14px; margin: .5rem 0; }

.uyari-serit {
  background: #FBF2E0; border: 1px solid #EEDDBA; color: #7A5715;
  border-radius: 8px; padding: .7rem 1rem; font-size: var(--t-caption);
  margin-bottom: 1.25rem;
}

/* ---------- giriş ---------- */

.giris-sayfa {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem;
}
.giris-kart { width: 100%; max-width: 380px; }
.giris-kart .kart-ic { padding: 2rem; }
.giris-kart h1 { font-size: 1.35rem; margin-bottom: .5rem; }
.giris-kart p { color: var(--muted); font-size: var(--t-caption); margin: 0 0 1.5rem; }
.giris-kart input { width: 100%; margin-bottom: 1rem; }
.giris-kart .btn { width: 100%; }
.giris-hata {
  background: #F8EBE7; color: var(--error); border: 1px solid #E8CDC5;
  border-radius: 8px; padding: .6rem .8rem; font-size: var(--t-caption);
  margin-bottom: 1rem;
}

/* --- tasarım kodu (ızgara kartı) ---
   Sipariş gelince baskı dosyası bu koddan bulunuyor; monospace çünkü
   göz karşılaştırması yapılıyor (HW0012 / HW0021). */
.tasarim-kod {
  display: inline-block; margin: -.25rem 0 .5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--t-caption); color: var(--muted); letter-spacing: .02em;
}

/* --- yükleme ekranı --- */
.birak-alani {
  background: var(--surface); border: 2px dashed var(--border);
  border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.birak-alani:hover, .birak-alani:focus-visible { border-color: var(--green-200); background: var(--green-50); }
.birak-alani.uzerinde { border-color: var(--green-600); background: var(--green-50); }
.birak-alani p { margin: 0 0 .5rem; }
.birak-baslik { font-size: var(--t-section); font-weight: 570; }
.birak-alani .btn { margin: .25rem 0 .6rem; }

.yukle-cubuk { margin: 1.25rem 0 .75rem; }
.yukle-cubuk .araclar-sag { display: flex; align-items: center; gap: .6rem; justify-content: flex-end; margin-bottom: .5rem; }

.ozet-serit {
  background: var(--green-50); border: 1px solid var(--green-200);
  color: var(--green-900); border-radius: 8px; padding: .7rem 1rem;
  font-size: var(--t-caption); margin-bottom: 1.25rem;
}

.liste { display: flex; flex-direction: column; gap: .35rem; }
.yukle-satir {
  display: grid; align-items: center; gap: .75rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 5.5rem 1fr 7rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .55rem .85rem; font-size: var(--t-caption);
}
.yukle-ad { font-weight: 570; overflow-wrap: anywhere; }
.yukle-kod {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted); overflow-wrap: anywhere;
}
.yukle-boyut { color: var(--muted); text-align: right; }
.yukle-satir .ilerleme-cubuk { height: 6px; }
.yukle-durum { justify-self: end; text-align: center; }

@media (max-width: 640px) {
  /* Dar ekranda ilerleme çubuğu ve boyut düşüyor: ad, kod ve sonuç kalıyor. */
  .yukle-satir { grid-template-columns: minmax(0, 1fr) 6rem; row-gap: .3rem; }
  .yukle-satir .ilerleme-cubuk, .yukle-boyut { display: none; }
  .yukle-kod { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .sayfa { padding: 1.75rem 1rem 3rem; }
  :root { --t-page: 1.5rem; }
  .izgara { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
}
