/* =====================================================================
   Olentro — tasarım sistemi
   Koyu tema, premium, teknoloji odaklı. Tek dosya, bağımlılık yok.
   ===================================================================== */

:root {
    /* Yüzeyler */
    --bg:          #07090f;
    --bg-2:        #0a0d16;
    --surface:     #0e1220;
    --surface-2:   #131829;
    --surface-3:   #1a2035;
    --line:        #1e2439;
    --line-soft:   #171c2d;

    /* Metin */
    --text:        #e8ecf6;
    --text-2:      #a3adc6;
    --text-3:      #6b7590;

    /* Marka — logodaki mavi + turuncu ikilisinden türetildi */
    --accent:       #4a82ff;   /* logo mavisi, koyu zeminde okunur tona çekildi */
    --accent-deep:  #2f63e0;
    --accent-2:     #ff8f45;   /* logo turuncusu */
    --accent-2-soft: rgba(255, 143, 69, 0.13);
    --accent-soft:  rgba(74, 130, 255, 0.13);
    --accent-line:  rgba(74, 130, 255, 0.33);

    /* Durum */
    --ok:          #29d18d;
    --ok-soft:     rgba(41, 209, 141, 0.13);
    --warn:        #f5b544;
    --warn-soft:   rgba(245, 181, 68, 0.13);
    --bad:         #ff5c6c;
    --bad-soft:    rgba(255, 92, 108, 0.13);
    --idle:        #6b7590;
    --idle-soft:   rgba(107, 117, 144, 0.13);

    /* Ölçüler */
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 18px;
    --r-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 8px 24px rgba(0,0,0,.36);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.5);

    --wrap: 1180px;
    --head-h: 62px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
svg { display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.22; margin: 0; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }

code, .mono { font-family: var(--mono); font-size: 0.9em; }

.muted   { color: var(--text-3); }
.small   { font-size: 13px; }
.nowrap  { white-space: nowrap; }
.ta-right{ text-align: right; }
.text-bad{ color: var(--bad); }
.text-ok { color: var(--ok); }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 20px;
}
.wrap--narrow { max-width: 760px; }

/* =====================================================================
   Marka
   ===================================================================== */
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none; font-weight: 700;
    letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; border-radius: 7px; }
.brand-text { font-size: 18px; }
.brand--sm .brand-text { font-size: 15px; }
.brand--stack {
    flex-direction: column; gap: 12px;
    width: 100%; justify-content: center; margin-bottom: 26px;
}
.brand--stack .brand-text { font-size: 22px; }

/* =====================================================================
   Butonlar
   ===================================================================== */
.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    --btn-bd: var(--line);
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px;
    font: inherit; font-size: 14px; font-weight: 560;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, transform .12s ease, opacity .16s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .42; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

.btn-primary {
    --btn-bg: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
    --btn-fg: #fff;
    --btn-bd: transparent;
    box-shadow: 0 4px 14px rgba(74,130,255,.30);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { --btn-bg: var(--surface-2); --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-3); --btn-fg: var(--text); }

.btn-danger { --btn-bg: var(--bad-soft); --btn-fg: var(--bad); --btn-bd: rgba(255,92,108,.3); }
.btn-danger:hover { --btn-bg: rgba(255,92,108,.2); }

.btn-sm  { padding: 6px 11px; font-size: 13px; }
.btn-lg  { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* =====================================================================
   Formlar
   ===================================================================== */
.form { display: grid; gap: 18px; }

.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 560; color: var(--text-2); }
.field-hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type=text], input[type=password], input[type=email], input[type=search],
input[type=date], select, textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit; font-size: 14.5px;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 76px; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7590' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 32px;
}

.input-group { display: flex; }
.input-group input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-addon {
    padding: 0 13px;
    font: inherit; font-size: 13px; font-weight: 560;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-left: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    cursor: pointer;
}
.input-addon:hover { color: var(--text); background: var(--surface-3); }

.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

.fieldset { border: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.fieldset legend {
    padding: 0; margin-bottom: 4px;
    font-size: 12px; font-weight: 680; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-3);
}
.fieldset + .fieldset { padding-top: 20px; border-top: 1px solid var(--line-soft); }

.role-list { display: grid; gap: 9px; }
.role-option {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}
.role-option:hover { border-color: var(--line); background: var(--surface-2); }
.role-option:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.role-option input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.role-body { display: grid; gap: 2px; font-size: 14px; }
.role-body .muted { font-size: 12.5px; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.inline-form { display: inline; }

/* =====================================================================
   Uyarı kutuları
   ===================================================================== */
.alert {
    padding: 12px 15px;
    border-radius: var(--r-sm);
    border: 1px solid;
    font-size: 14px;
    margin-bottom: 18px;
}
.alert-error   { color: #ffb3bb; background: var(--bad-soft);  border-color: rgba(255,92,108,.28); }
.alert-success { color: #8ff0c4; background: var(--ok-soft);   border-color: rgba(41,209,141,.28); }
.alert-info    { color: #b9cdff; background: var(--accent-soft); border-color: var(--accent-line); }
.alert-list { margin: 0; padding-left: 18px; }

/* =====================================================================
   Durum rozetleri
   ===================================================================== */
.status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    font-size: 12.5px; font-weight: 580;
    border-radius: 100px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status--ok     { color: var(--ok);   background: var(--ok-soft);   border-color: rgba(41,209,141,.24); }
.status--warn   { color: var(--warn); background: var(--warn-soft); border-color: rgba(245,181,68,.24); }
.status--bad    { color: var(--bad);  background: var(--bad-soft);  border-color: rgba(255,92,108,.24); }
.status--idle,
.status--locked { color: var(--idle); background: var(--idle-soft); border-color: rgba(107,117,144,.22); }
.status--ok .status-dot { box-shadow: 0 0 0 3px var(--ok-soft); }

.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11.5px; font-weight: 600;
    border-radius: 5px;
    vertical-align: middle;
}
.tag--ok    { color: var(--ok);   background: var(--ok-soft); }
.tag--bad   { color: var(--bad);  background: var(--bad-soft); }
.tag--muted { color: var(--text-3); background: var(--idle-soft); }

/* =====================================================================
   Genel site başlığı (public)
   ===================================================================== */
.sitehead {
    position: sticky; top: 0; z-index: 50;
    background: rgba(7,9,15,.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.sitehead-inner {
    max-width: var(--wrap); margin-inline: auto;
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero .wrap { position: relative; }

/* Iki kolon: solda metin, sagda logo */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 48px;
}
.hero-copy { min-width: 0; }

.hero-art {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
}

/* Parilti: logonun ARKASINDA, ondan tasmayan yumusak bir isik */
.hero-glow {
    position: absolute;
    left: 50%; top: 50%;
    width: 132%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 42% 44%, rgba(74,130,255,.30), transparent 58%),
        radial-gradient(circle at 62% 58%, rgba(255,143,69,.16), transparent 55%);
    filter: blur(26px);
    pointer-events: none;
}

.eyebrow {
    display: inline-block;
    padding: 5px 13px; margin-bottom: 22px;
    font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
    color: #b9cdff;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 100px;
}
.hero-title { font-size: clamp(38px, 7vw, 68px); font-weight: 720; letter-spacing: -0.035em; }
.grad {
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero-lead {
    max-width: 620px; margin-top: 22px;
    font-size: 17px; color: var(--text-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stats {
    display: flex; flex-wrap: wrap; gap: 40px;
    margin: 60px 0 0; padding-top: 30px;
    border-top: 1px solid var(--line-soft);
}
.hero-stats div { display: grid; gap: 4px; }
.hero-stats dt { font-size: 12.5px; color: var(--text-3); }
.hero-stats dd { margin: 0; font-size: 26px; font-weight: 680; letter-spacing: -0.02em; }

/* =====================================================================
   Bölümler
   ===================================================================== */
.section { padding: 76px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section-title { font-size: clamp(26px, 4vw, 36px); }
.section-lead { max-width: 620px; margin-top: 13px; color: var(--text-2); font-size: 16px; }

.product-grid {
    display: grid; gap: 18px; margin-top: 44px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.product-card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color .2s ease, transform .2s ease;
}
.product-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.product-icon {
    width: 44px; height: 44px; margin-bottom: 18px;
    display: grid; place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: var(--r);
}
.product-icon svg { width: 22px; height: 22px; }
.product-name { font-size: 19px; }
.product-desc { margin-top: 9px; color: var(--text-2); font-size: 14.5px; }
.product-lock {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 20px;
    font-size: 12.5px; color: var(--text-3);
}

.steps {
    display: grid; gap: 18px; margin: 44px 0 0; padding: 0;
    list-style: none;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    counter-reset: step;
}
.step {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.step-no {
    display: block; margin-bottom: 12px;
    font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
    color: var(--accent);
}
.step h3 { font-size: 16px; }
.step p { margin-top: 7px; color: var(--text-2); font-size: 14px; }

.cta { text-align: center; }
.cta-inner { display: grid; gap: 16px; justify-items: center; }

.sitefoot { padding: 46px 0 60px; border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.sitefoot-inner { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; display: grid; gap: 14px; }
.sitefoot-note { max-width: 560px; color: var(--text-3); font-size: 13px; }
.sitefoot-copy { color: var(--text-3); font-size: 12.5px; }

/* =====================================================================
   Uygulama başlığı
   ===================================================================== */
.topbar {
    position: sticky; top: 0; z-index: 60;
    background: rgba(10,13,22,.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    max-width: 1400px; margin-inline: auto;
    min-height: var(--head-h);
    padding: 0 20px;
    display: flex; align-items: center; gap: 22px;
}
.topnav { display: flex; align-items: center; gap: 3px; flex: 1; }
.topnav-link {
    padding: 7px 13px;
    font-size: 14px; font-weight: 540;
    color: var(--text-2);
    border-radius: var(--r-sm);
    transition: color .16s ease, background .16s ease;
}
.topnav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topnav-link.is-active { color: var(--text); background: var(--surface-3); }
.topnav-link--admin { color: var(--accent); }

.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-chip { display: grid; gap: 1px; text-align: right; line-height: 1.3; }
.user-name { font-size: 13.5px; font-weight: 580; }
.user-role { font-size: 11.5px; color: var(--text-3); }
.logout-form { display: inline; }

.nav-toggle {
    display: none;
    width: 38px; height: 38px;
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 1.6px; margin: 3px auto; background: var(--text-2); border-radius: 2px; }

.app-main { padding: 30px 0 64px; min-height: calc(100vh - var(--head-h) - 120px); }
.app-footer {
    padding: 20px; text-align: center;
    color: var(--text-3); font-size: 12.5px;
    border-top: 1px solid var(--line-soft);
}
.footer-sep { margin: 0 8px; }

/* =====================================================================
   Sayfa başlıkları / paneller
   ===================================================================== */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.page-title { font-size: clamp(23px, 3.4vw, 30px); }
.page-sub { margin-top: 7px; color: var(--text-2); font-size: 14.5px; }

.membership-chip {
    display: grid; gap: 2px;
    padding: 11px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    font-size: 14px;
}
.membership-label { font-size: 11.5px; color: var(--text-3); }

.panel {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 22px;
}
.panel--flush { padding: 0; overflow: hidden; }
.panel--flush .panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); margin: 0; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.panel-title { font-size: 16px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.subnav {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin: 18px 0 26px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.subnav-link {
    padding: 9px 14px;
    font-size: 14px; font-weight: 540;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}
.subnav-link:hover { color: var(--text); text-decoration: none; }
.subnav-link.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.grid-2 { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* =====================================================================
   Bot kartları
   ===================================================================== */
.bot-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.bot-card {
    display: flex; flex-direction: column;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.bot-card:not(.bot-card--locked):hover {
    border-color: var(--accent-line);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.bot-card--locked { opacity: .62; }
.bot-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bot-card-title { font-size: 18px; }
.bot-card-desc { margin-top: 10px; color: var(--text-2); font-size: 14px; }

.bot-meta {
    display: grid; gap: 12px;
    margin: 20px 0;
    padding: 15px 0;
    border-block: 1px solid var(--line-soft);
}
.bot-meta > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bot-meta dt { font-size: 12.5px; color: var(--text-3); }
.bot-meta dd { margin: 0; font-size: 13.5px; font-weight: 560; text-align: right; }

.bot-card .btn:last-child { margin-top: auto; }
.bot-locked-note { margin: 18px 0; font-size: 13px; color: var(--text-3); }

/* =====================================================================
   Görüntüleyici
   ===================================================================== */
.page-viewer .app-main { padding: 0; }
.viewer { display: flex; flex-direction: column; min-height: calc(100vh - var(--head-h)); }

.viewer-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 13px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.viewer-bar-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.viewer-back {
    display: grid; place-items: center;
    width: 34px; height: 34px; flex: none;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.viewer-back:hover { color: var(--text); background: var(--surface-3); }
.viewer-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.viewer-time { font-size: 13px; color: var(--text-2); }

.update-badge {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 5px 6px 5px 13px;
    font-size: 13px; font-weight: 560;
    color: #b9cdff;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 100px;
}
.update-badge[hidden] { display: none; }

.viewer-notice {
    padding: 11px 22px;
    font-size: 13.5px;
    border-bottom: 1px solid;
}
.viewer-notice--warn { color: #ffdda3; background: var(--warn-soft); border-color: rgba(245,181,68,.26); }
.viewer-notice--bad  { color: #ffb3bb; background: var(--bad-soft);  border-color: rgba(255,92,108,.26); }

.viewer-frame-wrap { flex: 1; display: flex; background: #fff; }
.viewer-frame { flex: 1; width: 100%; border: 0; display: block; min-height: 70vh; }

.viewer-empty {
    flex: 1;
    display: grid; place-content: center; justify-items: center; gap: 12px;
    padding: 80px 24px; text-align: center;
    color: var(--text-3);
}
.viewer-empty h2 { font-size: 19px; color: var(--text); }
.viewer-empty p { max-width: 420px; font-size: 14px; }

.viewer.is-fullscreen { position: fixed; inset: 0; z-index: 200; background: var(--bg); }

/* =====================================================================
   Tablolar
   ===================================================================== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
.table thead th {
    font-size: 11.5px; font-weight: 640; letter-spacing: .07em; text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
    white-space: nowrap;
    position: sticky; top: 0;
}
.table tbody tr:hover { background: rgba(255,255,255,.018); }
.table tbody tr:last-child td { border-bottom: none; }
.table--compact th, .table--compact td { padding: 9px 13px; }
.row--bad td:first-child { box-shadow: inset 2px 0 0 var(--bad); }
.link-strong { color: var(--text); font-weight: 580; }
.link-strong:hover { color: var(--accent); }

.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.toolbar-search { display: flex; gap: 9px; flex-wrap: wrap; }
.toolbar-search input, .toolbar-search select { width: auto; min-width: 150px; }

.stat-row {
    display: grid; gap: 13px; margin-bottom: 24px;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}
.stat {
    display: grid; gap: 5px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.stat-label { font-size: 12px; color: var(--text-3); }
.stat-value { font-size: 25px; font-weight: 680; letter-spacing: -0.02em; }
.stat-value.is-warn { color: var(--warn); }
.stat-value.is-bad  { color: var(--bad); }

.botstatus-list { display: grid; gap: 3px; }
.botstatus {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 13px 0;
    border-bottom: 1px solid var(--line-soft);
}
.botstatus:last-child { border-bottom: none; }
.botstatus-name { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.botstatus-meta { font-size: 13px; color: var(--text-2); }

.bot-panel-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.kv {
    display: grid; gap: 11px; margin: 0 0 18px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.kv > div { display: grid; gap: 3px; }
.kv dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 0; font-size: 13.5px; }

.meta-box {
    display: grid; gap: 5px;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    font-size: 13px;
}

/* =====================================================================
   Çıplak sayfalar (login / hata)
   ===================================================================== */
.bare-wrap {
    min-height: 100vh;
    display: grid; place-content: center; justify-items: center; gap: 20px;
    padding: 40px 20px;
    background:
        radial-gradient(900px 520px at 50% -10%, rgba(74,130,255,.16), transparent 70%),
        var(--bg);
}
.auth-card {
    width: 100%; max-width: 400px;
    padding: 34px 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 21px; text-align: center; }
.auth-sub { margin: 9px 0 24px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.auth-foot { margin-top: 22px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.bare-back a { color: var(--text-3); font-size: 13px; }

.error-card { max-width: 460px; text-align: center; }
.error-code {
    font-size: 72px; font-weight: 750; line-height: 1; letter-spacing: -0.04em;
    background: linear-gradient(180deg, var(--text-2), var(--text-3));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.error-title { margin-top: 12px; font-size: 22px; }
.error-msg { margin-top: 12px; color: var(--text-2); font-size: 14.5px; }
.error-ref { margin-top: 16px; color: var(--text-3); font-size: 12.5px; }
.error-ref code { padding: 2px 7px; background: var(--surface-2); border-radius: 5px; }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 900px) {
    .field-row { grid-template-columns: 1fr; }
    .hero { padding: 64px 0 56px; }
    .hero-stats { gap: 28px; }
    .section { padding: 56px 0; }
}

@media (max-width: 760px) {
    .topbar-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .nav-toggle { display: block; order: 3; margin-left: auto; }
    .topbar-user { order: 2; margin-left: auto; }
    .user-chip { display: none; }
    .topnav {
        order: 4;
        display: none;
        width: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding-top: 10px;
        border-top: 1px solid var(--line-soft);
    }
    .topnav.is-open { display: flex; }
    .topnav-link { padding: 11px 13px; }

    .wrap { padding-inline: 16px; }
    .panel { padding: 18px; }
    .viewer-bar { padding: 11px 16px; }
    .viewer-bar-meta { width: 100%; justify-content: space-between; }
    .viewer-notice { padding: 11px 16px; }
    .bot-grid, .product-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 18px; }
    .toolbar, .toolbar-search { flex-direction: column; align-items: stretch; }
    .toolbar-search input, .toolbar-search select { width: 100%; }
    .page-head { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .topbar, .app-footer, .viewer-bar, .subnav, .toolbar { display: none !important; }
}

/* =====================================================================
   Kod blogu ve sade liste  (yonetim panelindeki cron kutusu)
   ===================================================================== */
.codeblock {
    margin: 0 0 12px;
    padding: 13px 15px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: #9fc0ff;
    overflow-x: auto;
    white-space: pre;
    -webkit-user-select: all;
    user-select: all;
}

.plain-list {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--text-2);
}
.plain-list li { margin: 3px 0; }

/* =====================================================================
   Logo yerleşimleri
   ===================================================================== */

/* Üst menü / alt bilgi işareti — at kafası kırpımı (küçük boyutta okunur) */
.brand-mark {
    flex: none;
    width: auto;
    height: 30px;
    border-radius: 0;           /* şeffaf PNG, köşe yuvarlaması gerekmez */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}
.sitehead .brand-mark { height: 34px; }
.brand--sm .brand-mark { height: 24px; }

/* Giriş sayfası — logonun tamamı */
.auth-brand {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    margin-bottom: 26px;
    text-decoration: none;
}
.auth-brand:hover { text-decoration: none; }
.auth-logo {
    width: 148px; height: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .55));
}
.auth-wordmark {
    font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text);
}

/* Ana sayfa kahraman bölümü */
.hero-logo {
    position: relative;
    width: 100%; max-width: 420px; height: auto;
    filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .6));
}

@media (max-width: 900px) {
    /* Tek kolon: once logo, sonra metin */
    .hero-grid { grid-template-columns: 1fr; gap: 26px; }
    .hero-art  { order: -1; }
    .hero-logo { max-width: 260px; }
}

@media (max-width: 760px) {
    .hero-logo { max-width: 200px; }
    .auth-logo { width: 124px; }
    .brand-mark { height: 26px; }
    .sitehead .brand-mark { height: 30px; }
}

/* =====================================================================
   Mesai dışı durumu ve çalışma takvimi düzenleyici
   ===================================================================== */

/* Botun çalışmadığı saatler: nötr mavi-gri. Kırmızıdan bilinçli olarak
   ayrıştırıldı — bu bir arıza değil, planlı duraklama. */
.status--sleep {
    color: #8fa3c8;
    background: rgba(143, 163, 200, .12);
    border-color: rgba(143, 163, 200, .24);
}
.status--sleep .status-dot { opacity: .7; }

.offhours-note {
    margin: -4px 0 18px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #a9bad8;
    background: rgba(143, 163, 200, .08);
    border: 1px solid rgba(143, 163, 200, .18);
    border-radius: var(--r-sm);
}

.viewer-notice--sleep {
    color: #a9bad8;
    background: rgba(143, 163, 200, .10);
    border-color: rgba(143, 163, 200, .22);
}

/* --- Takvim düzenleyici --- */
.sched-box {
    margin-top: 4px;
    padding: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: var(--bg-2);
}
.sched-box > summary {
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 560;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}
.sched-box > summary:hover { color: var(--text); }
.sched-box[open] > summary { border-bottom: 1px solid var(--line-soft); }
.sched-form { padding: 14px; display: grid; gap: 14px; }
.sched-box .field-hint { padding: 0 14px; }
.sched-box[open] .field-hint:first-of-type { padding-top: 12px; }

.sched-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sched-day {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px;
    font-size: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 100px;
    cursor: pointer;
}
.sched-day:has(input:checked) {
    color: #cfe0ff;
    background: var(--accent-soft);
    border-color: var(--accent-line);
}
.sched-day input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

.sched-times { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.sched-times label {
    display: grid; gap: 5px;
    font-size: 12.5px; color: var(--text-3);
}
.sched-times input[type=number] {
    width: auto; min-width: 128px;
    padding: 8px 11px;
    font: inherit; font-size: 14px;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.sched-times input[type=time] {
    width: auto; min-width: 128px;
    padding: 8px 11px;
    font: inherit; font-size: 14px;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}

/* =====================================================================
   Yeni üretilmiş token — yalnızca bir kez gösterilir
   ===================================================================== */
.token-panel {
    border-color: var(--accent-line);
    background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--surface);
}
.token-value {
    display: block;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-sm);
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: .02em;
    color: #9fc0ff;
    word-break: break-all;
    -webkit-user-select: all;
    user-select: all;
}
