/* S-Designer yonetim paneli.
 *
 * Palet ve duzen EDITORUN temasindan alindi (editor/Theme.py): ayni teal
 * vurgu, ayni koyu arduvaz etiket rengi, ayni "baslik seridi + cerceveli
 * bolum" iskeleti. Kullanici iki yuzey arasinda gidip gelirken ayni
 * programda oldugunu hissetmeli.
 *
 * Renk degerleri Theme.py ile BIREBIR ayni; oradan degisirse burasi da
 * degismeli.
 *
 * YERLESIM KURALI: sayfa NORMAL akisinda kayar. Daha once her sey ekran
 * yuksekligine gore bolmelere bolunmustu ve her ekran boyutunda ayri
 * bozuluyordu. Simdi yalnizca baslik seridi yapisik duruyor, gerisi
 * metin gibi akiyor; dar ekranda sutunlar alt alta duser, tablolar kendi
 * icinde yatay kayar.
 */

:root {
  --teal:        #16a085;   /* THEME_COLOR      -- birincil vurgu */
  --teal-dark:   #11806a;   /* THEME_DARK_COLOR */
  --danger:      #e74c3c;   /* DANGER_COLOR     -- yikici eylem */
  --info:        #3498db;   /* INFO_COLOR */
  --warning:     #e67e22;   /* WARNING_COLOR */
  --success:     #27ae60;   /* SUCCESS_COLOR */
  --grey:        #95a5a6;   /* GRAY_COLOR       -- notr dugme */
  --label:       #34495e;   /* LABEL_COLOR      -- koyu etiket yazisi */
  --body:        #505050;   /* BODY_COLOR */
  --muted:       #787878;   /* MUTED_COLOR      -- ipucu / ikincil yazi */
  --border:      #dcdcdc;   /* BORDER_COLOR */
  --item-bg:     #f5f5f5;   /* ITEM_BG_COLOR */
  --selected:    #e6faf5;   /* SELECTED_BG_COLOR */
  --alt-row:     #f0f8f5;   /* ALT_ROW_COLOR */
  --hover:       #ebebeb;   /* HOVER_BG_COLOR */
  --panel:       #f8f9f9;   /* PANEL_BG_COLOR */
  --subtitle:    #dcdcdc;   /* HEADER_SUBTITLE_COLOR */
  --error-bg:    #ffebee;   /* ERROR_BG_COLOR */
  --error:       #c0392b;   /* ERROR_COLOR */
}

* { box-sizing: border-box; }

/* GIZLEME HER SEYI YENER.
 *
 * Panel gostermeyi/gizlemeyi `hidden` ozniteligiyle yapiyor. Tarayicinin
 * kendi kurali (`[hidden] { display: none }`) EN ZAYIF kuraldir: bir
 * sinifa `display: flex` yazmak onu sessizce eziyor. Bu bir kez oldu ve
 * butun bolumler ust uste bindi. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 14px/1.55 "Segoe UI", system-ui, sans-serif;
  color: var(--body);
  background: #fff;
}

/* Oturum denetimi bitene kadar sayfa GORUNMEZ: yetkisiz kullanici
 * yonlendirilirken iceriyi bir an gormesin. */
body.app { visibility: hidden; }
body.app.ready { visibility: visible; }

a { color: var(--info); }

/* ======================================================= GIRIS SAYFASI ==
 * Iki bolme: solda teal tanitim alani, sagda sade form. Dar ekranda
 * tanitim ustte kalir ve kuculur.
 */
.login-page { display: flex; min-height: 100vh; flex-wrap: wrap; }

.login-hero {
  flex: 1 1 380px;
  background: linear-gradient(150deg, #16a085 0%, #11806a 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 10px; padding: 48px clamp(24px, 6vw, 90px);
}
.login-logo { width: 72px; height: 72px; margin-bottom: 6px; }
.login-hero h1 { margin: 0; font-size: clamp(22px, 3vw, 30px);
                 font-weight: 600; }
.login-hero p { margin: 0; font-size: 15px; color: var(--subtitle);
                max-width: 340px; }
.login-tag { margin-top: 26px; font-size: 12px; letter-spacing: .08em;
             color: rgba(255, 255, 255, .6); text-transform: lowercase; }

.login-form-area {
  flex: 1 1 380px; display: flex; align-items: center; justify-content: center;
  padding: 48px clamp(20px, 5vw, 60px); background: #fff;
}
.login-form { width: 100%; max-width: 330px; display: flex;
              flex-direction: column; gap: 14px; }
.login-form h2 { margin: 0; font-size: 20px; color: var(--label); }
.login-form .note { margin: -8px 0 4px; }
button.wide { width: 100%; }
.thin { align-self: center; color: var(--info); font-size: 13px;
        text-decoration: none; }
.thin:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .login-hero { flex-basis: 100%; padding: 32px 24px; gap: 6px; }
  .login-logo { width: 52px; height: 52px; }
  .login-tag { display: none; }
  .login-form-area { padding: 32px 24px 48px; }
}

/* ======================================================== BASLIK SERIDI ==*/
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px clamp(12px, 3vw, 22px);
  background: var(--teal); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff;
         text-decoration: none; }
.brand-logo { width: 30px; height: 30px; display: block; }
.brand-text { line-height: 1.2; }
.brand-text b { display: block; font-size: 15px; font-weight: 600; }
.brand-text span { font-size: 11px; color: var(--subtitle); }

/* Menu gerekirse KENDI ICINDE kayar: dar ekranda ogeler kirpilmaz,
   baslik seridi de buyumez. */
.nav {
  display: flex; gap: 4px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  background: none; border: none; color: rgba(255, 255, 255, .85);
  padding: 7px 13px; border-radius: 4px; cursor: pointer; font: inherit;
  white-space: nowrap; text-decoration: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .22); color: #fff;
                   font-weight: 600; }

.who { position: relative; display: flex; align-items: center; gap: 10px;
       font-size: 13px; }
.lang-select {
  background: rgba(255, 255, 255, .15); color: #fff; border: none;
  border-radius: 4px; padding: 5px 8px; font: inherit; font-size: 12px;
  cursor: pointer;
}
.lang-select option { color: var(--body); }
.lang-select.public { background: var(--item-bg); color: var(--body);
                      align-self: center; margin-top: 6px; }

.account {
  display: flex; align-items: center; gap: 8px; background: none;
  border: none; color: #fff; cursor: pointer; font: inherit; padding: 4px;
  max-width: 46vw;
}
.account-name { overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; }
.badge {
  background: rgba(255, 255, 255, .18); padding: 2px 9px; border-radius: 11px;
  font-size: 11px; letter-spacing: .03em; text-transform: uppercase;
}
.account-menu {
  position: absolute; right: 0; top: 40px; background: #fff;
  border: 1px solid var(--border); border-radius: 5px; min-width: 190px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12); overflow: hidden; z-index: 30;
}
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; cursor: pointer; font: inherit;
  color: var(--label); text-decoration: none;
}
.account-menu a:hover,
.account-menu button:hover { background: var(--selected); }

@media (max-width: 720px) {
  .topbar { gap: 8px; }
  .brand-text { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .who { margin-left: auto; }
}

/* ================================================================ SAYFA ==*/
.page { max-width: 1400px; margin: 0 auto;
        padding: 18px clamp(12px, 3vw, 22px) 40px; }
.page-head { margin-bottom: 14px; }
.page-head h2 { margin: 0 0 2px; font-size: 18px; color: var(--label); }
.note { color: var(--muted); font-size: 13px; margin: 0; }
.error-text { color: var(--error); margin: 0; font-size: 13px; }
.ok-text { color: var(--success); margin: 0; font-size: 13px; }
.empty { color: var(--muted); font-size: 13px; padding: 10px 2px; }

.center { display: flex; justify-content: center; padding-top: 40px; }

/* ------------------------------------------------------------- formlar --*/
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px;
        font-weight: 600; color: var(--label); }
input, select, textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px;
  font: 14px/1.4 inherit; color: var(--body); background: #fff;
  max-width: 100%;
}
textarea { resize: vertical; font-family: inherit; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--selected);
}
input[type="file"] { padding: 6px; font-size: 13px; }

button.primary, button.secondary, button.danger, .link-button {
  min-width: 110px; height: 35px; padding: 0 16px; border: none;
  border-radius: 4px; color: #fff; cursor: pointer; font: inherit;
  font-weight: 600; display: inline-flex; align-items: center;
  justify-content: center; text-decoration: none;
}
button.primary, .link-button.primary { background: var(--teal); }
button.primary:hover { background: var(--teal-dark); }
button.secondary, .link-button.secondary { background: var(--grey); }
button.danger { background: var(--danger); }
button:disabled { background: var(--border); cursor: default; }

.link {
  background: none; border: none; color: inherit; cursor: pointer;
  text-decoration: underline; font: inherit; padding: 0;
}
.button-row { display: flex; gap: 8px; justify-content: flex-end;
              flex-wrap: wrap; }

.card {
  width: 100%; max-width: 400px; background: #fff;
  border: 1px solid var(--border); border-radius: 6px; padding: 0 0 20px;
}
.card-head { background: var(--teal); color: #fff; padding: 14px 20px;
             border-radius: 5px 5px 0 0; }
.card-head b { display: block; font-size: 15px; }
.card-head span { font-size: 12px; color: var(--subtitle); }
.card form { display: flex; flex-direction: column; gap: 14px;
             padding: 20px 20px 0; }

.form-card {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel); padding: 14px 16px; margin-bottom: 16px;
}
.form-card h3 { margin: 0 0 10px; font-size: 13px; color: var(--label);
                text-transform: uppercase; letter-spacing: .04em; }
/* Alanlar sigmazsa ALT SATIRA duser; hicbir ekranda tasma olmaz. */
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row label { flex: 1 1 170px; min-width: 0; }
.form-row button { flex: 0 0 auto; }

.file-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-row input[type="file"] { flex: 1 1 160px; min-width: 0; }
.file-row button { flex: 0 0 auto; min-width: 84px; height: 30px;
                   font-size: 13px; }

/* ------------------------------------------------------------ tablolar --*/
/* Tablo dar ekranda KENDI ICINDE yatay kayar; sayfayi genisletmez. */
.table-wrap { overflow-x: auto; border: 1px solid var(--border);
              border-radius: 6px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 13px;
        min-width: 560px; }
table.small { min-width: 420px; }
th, td { text-align: left; padding: 9px 12px; vertical-align: top;
         border-bottom: 1px solid var(--border); }
th { background: var(--panel); color: var(--label); font-weight: 600;
     white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--alt-row); }
tbody tr:hover { background: var(--hover); }
tbody tr.open { background: var(--selected); }
td.summary { max-width: 340px; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end;
               flex-wrap: wrap; }
.small-btn {
  border: none; border-radius: 4px; color: #fff; cursor: pointer;
  font: inherit; font-size: 12px; padding: 5px 10px; white-space: nowrap;
  background: var(--teal);
}
.small-btn.grey { background: var(--grey); }
.small-btn.red  { background: var(--danger); }
.role-select { font-size: 12px; padding: 4px 6px; }

.status-badge {
  display: inline-block; padding: 2px 9px; border-radius: 11px;
  font-size: 11px; color: #fff; white-space: nowrap;
}
.status-new      { background: var(--teal); }
.status-read     { background: var(--info); }
.status-closed   { background: var(--grey); }
.status-critical { background: var(--danger); }
.kind-crash      { color: var(--danger); font-weight: 600; }
.kind-feedback   { color: var(--info); font-weight: 600; }

/* ================================================ IKI BOLMELI SAYFALAR ==
 * Bildirimler (liste + detay) ve sihirbaz (adimlar + surumler) ayni
 * iskeleti kullanir: genis ekranda yan yana, dar ekranda ALT ALTA.
 */
.two-pane { display: grid; gap: 16px; align-items: start;
            grid-template-columns: 1fr; }
@media (min-width: 1080px) {
  .two-pane { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); }
}
.two-pane > * { min-width: 0; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
        align-items: center; }
.tab {
  background: #fff; border: 1px solid var(--border); border-radius: 4px;
  padding: 5px 12px; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--label); white-space: nowrap;
}
.tab:hover { background: var(--hover); }
.tab.active { background: var(--teal); border-color: var(--teal);
              color: #fff; }
.spacer { flex: 1 1 10px; }

.detail { border: 1px solid var(--border); border-radius: 6px;
          background: #fff; }
.detail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; background: var(--panel);
  border-bottom: 1px solid var(--border); border-radius: 5px 5px 0 0;
  color: var(--label);
}
.detail-body { padding: 14px; display: flex; flex-direction: column;
               gap: 14px; }
.detail-body .section h3 {
  margin: 0 0 6px; font-size: 12px; color: var(--label);
  text-transform: uppercase; letter-spacing: .04em;
}
.box {
  background: var(--item-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 12px; font-size: 13px;
  max-height: 320px; overflow: auto; word-break: break-word;
}
.box.code { font: 12px/1.5 Consolas, "Courier New", monospace;
            white-space: pre-wrap; margin: 0; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr;
     gap: 4px 12px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-word; }
.attachments { margin: 0; padding-left: 18px; font-size: 13px; }
.actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* ======================================================= SURUM KARTLARI ==
 * Akordeon: en yeni surum acik gelir, eskiler kapali durur ve basligina
 * tiklayinca acilir (kullanici karari, 2026-09-23). Tek sutun -- surum
 * notu okunacak bir metindir, yan yana dizilen kartlarda daralir.
 */
.release-list { display: flex; flex-direction: column; gap: 12px;
                max-width: 900px; }

.release-card {
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  overflow: hidden;
}
.release-card.open { border-color: var(--teal); }

.release-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; background: var(--panel); border: none;
  border-bottom: 1px solid transparent; cursor: pointer; font: inherit;
  text-align: left; color: var(--label); flex-wrap: wrap;
}
.release-card.open .release-head { background: var(--selected);
                                   border-bottom-color: var(--border); }
.release-head:hover { background: var(--hover); }
.release-head b { font-size: 15px; }

/* Ok isareti: acikken asagi doner. Yazi tipine bagli kalmamak icin
   CSS ile ciziliyor. */
.chevron {
  width: 0; height: 0; flex: 0 0 auto;
  border-left: 6px solid var(--label);
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform .15s;
}
.release-card.open .chevron { transform: rotate(90deg) translateX(1px); }

.release-date { color: var(--muted); font-size: 12px; margin-left: auto; }

.release-body { padding: 14px 16px 16px; display: none; }
.release-card.open .release-body { display: block; }

/* --- Markdown gorunumu --------------------------------------------------
 * Surum notu .md olarak yukleniyor; okunakli olmasi icin bicimlendirilir
 * (kullanici karari, 2026-09-23).
 */
.release-note-body h3, .release-note-body h4,
.release-note-body h5, .release-note-body h6 {
  margin: 14px 0 6px; color: var(--label); font-size: 14px;
}
.release-note-body h3:first-child, .release-note-body h4:first-child { margin-top: 0; }
.release-note-body h3 {
  font-size: 15px; padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.release-note-body p { margin: 0 0 10px; }
.release-note-body ul, .release-note-body ol { margin: 0 0 12px; padding-left: 22px; }
.release-note-body li { margin-bottom: 4px; }
.release-note-body li::marker { color: var(--teal); }
.release-note-body code {
  background: var(--item-bg); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 5px;
  font: 12px/1.4 Consolas, "Courier New", monospace;
}
.release-note-body .md-code {
  background: var(--item-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 12px; overflow-x: auto;
  font: 12px/1.5 Consolas, "Courier New", monospace; margin: 0 0 12px;
}
.release-note-body blockquote {
  margin: 0 0 12px; padding: 6px 12px; color: var(--muted);
  border-left: 3px solid var(--teal); background: var(--panel);
}
.release-note-body hr { border: none; border-top: 1px solid var(--border);
                   margin: 14px 0; }
.release-note-body strong { color: var(--label); }

/* --- indirme dugmeleri -------------------------------------------------
 * Notun USTUNDE dururlar. Kurulum dosyasi birinci oncelik: daha genis,
 * daha koyu ve simgesi buyuk. Guncelleme paketi yaninda, daha kucuk.
 */
.downloads {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.download {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  border-radius: 6px; color: #fff; padding: 12px 16px; min-width: 0;
  transition: transform .1s, box-shadow .1s, background .12s;
}
.download:hover { transform: translateY(-1px);
                  box-shadow: 0 4px 12px rgba(0, 0, 0, .16); }
.download:active { transform: none; box-shadow: none; }

.download.main {
  flex: 2 1 260px; background: var(--teal);
  box-shadow: 0 2px 6px rgba(22, 160, 133, .28);
}
.download.main:hover { background: var(--teal-dark); }
.download.alt { flex: 1 1 180px; background: var(--grey); }
.download.alt:hover { background: #7f8c8d; }

.download-icon { flex: 0 0 auto; display: block; }
.download.main .download-icon { width: 26px; height: 26px; }
.download.alt .download-icon { width: 20px; height: 20px; }

.download-text { display: flex; flex-direction: column; min-width: 0;
                 line-height: 1.25; }
.download-text b { font-weight: 600; overflow: hidden;
                   text-overflow: ellipsis; white-space: nowrap; }
.download.main .download-text b { font-size: 15px; }
.download.alt .download-text b { font-size: 13px; }
.download-size { font-size: 12px; opacity: .85; }

.release-note-body { min-width: 0; }

/* ==================================================== SIHIRBAZ ADIMLARI ==*/
.wizard-col { display: flex; flex-direction: column; min-width: 0; }
.step h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
           text-transform: none; font-size: 14px; letter-spacing: 0; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--teal);
  color: #fff; font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.step.done .step-no { background: var(--success); }
.step.done { border-color: var(--success); }

.status { font-size: 13px; color: var(--muted); display: block;
          margin-top: 6px; word-break: break-word; }
.status.ok  { color: var(--success); }
.status.bad { color: var(--error); }

.note-fields { display: grid; gap: 14px; margin-bottom: 10px;
               grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.note-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.note-field > span { font-size: 13px; font-weight: 600; color: var(--label); }
.note-field textarea { width: 100%; }

/* ============================================================ DIL SECIMI ==
 * Acilir liste (kullanici karari, 2026-09-23). Tarayicinin kendi
 * `<select>`i kullanilmadi: icine bayrak konamiyor.
 */
.lang-corner { position: absolute; top: 14px; right: 16px; z-index: 40; }
.lang-picker { position: relative; }

.lang-button {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px;
  background: rgba(255, 255, 255, .15); color: #fff;
  padding: 4px 8px; font: inherit; font-size: 12px; line-height: 1;
}
.lang-button:hover { background: rgba(255, 255, 255, .25); }
.lang-button img { width: 20px; height: 14px; display: block;
                   border-radius: 2px; object-fit: cover; }
.lang-name { white-space: nowrap; }
.caret {
  width: 0; height: 0; margin-left: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

/* Giris sayfasinda zemin beyaz: dugme de acik renkte durmali. */
.lang-corner .lang-button {
  background: #fff; color: var(--label); border-color: var(--border);
}
.lang-corner .lang-button:hover { background: var(--hover); }

.lang-menu {
  position: absolute; right: 0; top: calc(100% + 4px); min-width: 150px;
  background: #fff; border: 1px solid var(--border); border-radius: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .14); overflow: hidden; z-index: 50;
}
.lang-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--label); text-align: left;
}
.lang-option:hover { background: var(--selected); }
.lang-option.active { font-weight: 600; background: var(--item-bg); }
.lang-option img { width: 20px; height: 14px; display: block;
                   border-radius: 2px; object-fit: cover; }

/* ====================================================== PAROLA ALANLARI ==*/
.secret { position: relative; display: block; }
.secret input { width: 100%; padding-right: 40px; }
/* Goz simgesi: yazi tipine bagli kalmamak icin CSS ile ciziliyor. */
.peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 26px; border: none; background: none; cursor: pointer;
  padding: 0; opacity: .55;
}
.peek::before {
  content: ""; position: absolute; inset: 6px 3px;
  border: 2px solid var(--label); border-radius: 50% / 60%;
}
.peek::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--label);
}
.peek:hover { opacity: .9; }
/* Acikken uzerine cizgi: parolanin GORUNUR oldugu anlasilsin. */
.peek.on { opacity: 1; }
.peek.on::before { border-color: var(--teal); }
.peek.on::after { background: var(--teal); }

/* Ilk giris sayfasi hem "app" hem "login-page": kabuk basilmaz, yerlesim
   giris ekraninin aynisidir. */
body.app.login-page.ready { visibility: visible; }

/* ================================================== KULLANICI PANELI ==
 * Bildirim listesinde gonderene, kullanici listesinde satira tiklayinca
 * acilir (kullanici karari, 2026-09-23).
 */
.side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Gonderen adi TIKLANABILIR oldugu anlasilsin. */
.sender { color: var(--info); text-decoration: none;
          border-bottom: 1px dashed currentColor; }
.sender:hover { color: var(--teal-dark); }

tbody tr.clickable { cursor: pointer; }

.row-actions.start { justify-content: flex-start; margin-top: 10px; }

.filter-note {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--selected); border: 1px solid var(--teal);
  border-radius: 4px; padding: 8px 12px; margin-bottom: 12px;
  color: var(--label);
}
\n
/* ================================================ YAYIN GEREKSINIMLERI ==
 * Hepsi tamam olmadan "Yayinla" ACILMAZ (kullanici karari, 2026-09-23).
 * Kullanici neyin eksik oldugunu tek bakista gormeli.
 */
.checklist { list-style: none; margin: 0 0 14px; padding: 0;
             display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 8px;
                font-size: 13px; color: var(--muted); }
.checklist li.done { color: var(--label); }

.tick {
  width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--border); position: relative;
}
.checklist li.done .tick { border-color: var(--success);
                           background: var(--success); }
/* Onay isareti: iki cizgiden olusuyor, yazi tipine bagli degil. */
.checklist li.done .tick::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ================================================== ACILIR PENCERE ==
 * Kullanici ayrintisi ORTADA acilir (kullanici karari, 2026-09-23). Yan
 * panel tabloyu daraltiyor ve sayfanin bir yani bos kalip oransiz
 * duruyordu.
 */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: flex-start; justify-content: center;
  padding: 6vh 16px 24px; background: rgba(20, 30, 28, .45);
  overflow-y: auto;
}
.modal {
  width: 100%; max-width: 520px; background: #fff; border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .28); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; background: var(--teal); color: #fff;
}
.modal-head b { font-size: 15px; overflow: hidden;
                text-overflow: ellipsis; white-space: nowrap; }
.modal-close {
  width: 28px; height: 28px; flex: 0 0 auto; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .18); border-radius: 4px; position: relative;
}
.modal-close:hover { background: rgba(255, 255, 255, .3); }
/* Carpi: yazi tipine bagli kalmamak icin iki cizgi. */
.modal-close::before, .modal-close::after {
  content: ""; position: absolute; left: 7px; top: 13px;
  width: 14px; height: 2px; background: #fff;
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }

.modal-body { padding: 16px 18px 18px; display: flex;
              flex-direction: column; gap: 16px; }
.modal-body .section h3 {
  margin: 0 0 8px; font-size: 12px; color: var(--label);
  text-transform: uppercase; letter-spacing: .04em;
}
.role-field { max-width: 220px; margin-bottom: 12px; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dialog-status { margin-top: 10px; }
.dialog-status.ok { color: var(--success); }
.dialog-status.bad { color: var(--error); }

.count-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.count-chip {
  background: var(--item-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 3px 10px; font-size: 12px;
  color: var(--label);
}

/* Rol etiketi: listede rol tek bakista ayirt edilsin. */
.role-tag {
  display: inline-block; padding: 2px 9px; border-radius: 11px;
  font-size: 11px; border: 1px solid var(--border); color: var(--label);
  background: var(--item-bg); white-space: nowrap;
}
.role-tag.role-root { border-color: var(--teal); color: var(--teal-dark);
                      background: var(--selected); }
.role-tag.role-admin { border-color: var(--info); color: var(--info); }

/* ==================================================== BILDIRIM SERIDI ==*/
.block { margin-bottom: 22px; }
.block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.block-head h3 {
  margin: 0; font-size: 13px; color: var(--label);
  text-transform: uppercase; letter-spacing: .04em;
}

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stat {
  flex: 1 1 120px; min-width: 0; background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px;
}
.stat b { display: block; font-size: 22px; line-height: 1.1;
          color: var(--label); }
.stat span { font-size: 12px; color: var(--muted); }
.stat.accent { border-color: var(--teal); background: var(--selected); }
.stat.accent b { color: var(--teal-dark); }

.toolbar { display: flex; gap: 12px; align-items: center;
           flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .tabs { margin-bottom: 0; flex: 1 1 auto; }
.tab-sep { width: 1px; height: 20px; background: var(--border); }
.search { flex: 0 1 260px; min-width: 160px; }

.pager { display: flex; gap: 12px; align-items: center;
         justify-content: center; margin-top: 14px; }

/* Okunmamis kayit VURGULU durur. */
tbody tr.unread td { font-weight: 600; color: var(--label); }
tbody tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--teal); }

td.summary { max-width: 360px; display: flex; gap: 8px;
             align-items: baseline; }
td.summary > span:first-child { overflow: hidden;
                                text-overflow: ellipsis; }
.clip { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Teknik bilgi katlanir: cogu zaman bakilmaz, yer kaplamasin. */
details.tech > summary {
  cursor: pointer; font-size: 12px; color: var(--label);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px;
}
details.tech > summary:hover { color: var(--teal-dark); }

/* Duzenlenen surum seridi: hangi surum uzerinde calisildigi belli olsun. */
.editing-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
  background: var(--selected); border: 1px solid var(--teal);
  border-radius: 4px; padding: 8px 12px; color: var(--label); font-size: 13px;
}
.note.warn { color: var(--warning); }
/* Kilitli alan, kilitli oldugunu GOSTERMELI. */
input:disabled, select:disabled, textarea:disabled {
  background: var(--item-bg); color: var(--muted); cursor: not-allowed;
}

/* Onay penceresi: geri alinamaz islemler once sorar. */
.modal.narrow { max-width: 420px; }
.modal-head.danger { background: var(--danger); }
.confirm-text { margin: 0; font-size: 14px; color: var(--label); }
.modal-backdrop.confirm { z-index: 70; align-items: center; }

/* Hesap menusunun altindaki surum satiri: bilgi, tiklanabilir degil. */
.menu-footer {
  padding: 8px 14px; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--border); background: var(--panel);
  white-space: nowrap;
}


/* ================================================= YUKLEME ILERLEMESI ==
 * Kullanici istegi (2026-09-24): "dosyanin yuklendigi belli degil".
 * Cubuk yuzdeyi, giden/toplam bayti, hizi ve kalan sureyi gosterir;
 * yukleme bitince "sunucu isliyor" asamasinda CIZGILI olur -- %100'de
 * duran duz bir cubuk takilmis gorunur.
 */
.upload-progress { margin: 8px 0 4px; }
.upload-box { display: flex; flex-direction: column; gap: 5px; }
.bar-line { display: flex; align-items: center; gap: 10px; }
.bar-phase { font-size: 13px; color: var(--label); font-weight: 600; }
.bar-percent { font-size: 13px; color: var(--muted);
               font-variant-numeric: tabular-nums; }
.bar-line .small-btn { margin-left: auto; }
.bar-track {
  height: 8px; border-radius: 4px; background: var(--item-bg);
  border: 1px solid var(--border); overflow: hidden;
}
.bar-fill {
  height: 100%; width: 0; background: var(--teal);
  transition: width 0.15s linear;
}
.bar-fill.ok  { background: var(--success); }
.bar-fill.bad { background: var(--danger); }
/* Sunucu isliyor: ilerleme YOK ama is suruyor. */
.bar-fill.working {
  background: repeating-linear-gradient(45deg, var(--teal), var(--teal) 8px,
              var(--teal-dark) 8px, var(--teal-dark) 16px);
  animation: bar-move 0.8s linear infinite;
}
@keyframes bar-move { from { background-position: 0 0; }
                      to   { background-position: 32px 0; } }
.bar-detail { font-size: 12px; color: var(--muted);
              font-variant-numeric: tabular-nums; }

/* ============================================================ AYARLAR ==
 * Imza anahtarlari ve calisan ayarlar (settings.html).
 */
.key-form { display: flex; flex-direction: column; gap: 10px;
            margin-top: 14px; }
.wide-field { display: block; }
.wide-field textarea { width: 100%; font-family: Consolas, "Courier New", monospace;
                       font-size: 12px; }
.file-pick { flex: 1 1 200px; min-width: 0; }
.key-id { font-size: 12px; word-break: break-all; }
/* Aciklama sutunu genis olmali: kisaltilmis bir cumle bir sey anlatmaz. */
.settings-table td:last-child { color: var(--muted); font-size: 12px;
                                min-width: 220px; }
.settings-table code { font-size: 12px; }
.setting-value { font-weight: 600; color: var(--label);
                 white-space: nowrap; }
