/* Uluçam Otomasyon — Yönetim Paneli tasarım sistemi (siteden bağımsız) */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --line: #e3e8ef;
  --line-soft: #eef1f6;
  --ink: #0f172a;
  --text: #334155;
  --mute: #64748b;
  --navy: #0a1a30;
  --navy-2: #12284a;
  --p: #0f55a0;
  --p-dark: #0b417c;
  --p-soft: #e8f0fb;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --r: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "Raleway", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { list-style: none; }
.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Giriş ---------- */
.a-login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #1b3d6e 0%, transparent 60%), var(--navy);
}
.a-login-card {
  width: 100%; max-width: 410px; background: var(--surface); border-radius: 14px;
  padding: 36px 34px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.a-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; color: var(--ink); }
.a-logo b { color: var(--p); }
.a-logo-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--p); display: grid; place-items: center; color: #fff; }
.a-login-card h1 { font-size: 1.5rem; color: var(--ink); margin: 26px 0 6px; }
.a-login-card p { color: var(--mute); margin-bottom: 22px; }

/* ---------- Kabuk ---------- */
.a-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.a-side {
  position: sticky; top: 0; height: 100vh; background: var(--navy); color: #cbd5e1;
  display: flex; flex-direction: column; padding: 20px 14px;
}
.a-side .a-logo { color: #fff; padding: 4px 8px 22px; font-size: .95rem; }
.a-side .a-logo b { color: #7db4f0; }
.a-nav-group { font-size: .68rem; font-weight: 700; letter-spacing: .14em; color: #64748b; padding: 18px 10px 6px; }
.a-nav button {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 2px;
  background: transparent; border: 0; border-radius: 8px; color: #cbd5e1; font-weight: 600; text-align: left; transition: .15s;
}
.a-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.a-nav button.on { background: var(--p); color: #fff; }
.a-nav .count {
  margin-left: auto; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 20px;
  background: rgba(255, 255, 255, .1); color: #cbd5e1;
}
.a-nav button.on .count { background: rgba(255, 255, 255, .22); color: #fff; }
.a-nav .count.alert { background: var(--danger); color: #fff; }
.a-side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.a-side-foot a, .a-side-foot button {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent;
  color: #94a3b8; font-weight: 600; width: 100%; text-align: left;
}
.a-side-foot a:hover, .a-side-foot button:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.a-main { padding: 30px 38px 60px; min-width: 0; max-width: 1360px; }
.a-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.a-pagehead h1 { font-size: 1.55rem; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.a-pagehead p { color: var(--mute); margin-top: 3px; max-width: 640px; }
.a-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Bileşenler ---------- */
.a-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.a-card-pad { padding: 22px 24px; }
.a-card h2 { font-size: 1.05rem; color: var(--ink); font-weight: 800; }
.a-card .sub { color: var(--mute); font-size: .84rem; margin-top: 2px; }
.a-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }

.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: .86rem; transition: .15s; white-space: nowrap;
}
.a-btn:hover { border-color: #c4cddb; background: #f8fafc; }
.a-btn.primary { background: var(--p); border-color: var(--p); color: #fff; }
.a-btn.primary:hover { background: var(--p-dark); border-color: var(--p-dark); }
.a-btn.danger { color: var(--danger); }
.a-btn.danger:hover { background: var(--danger-soft); border-color: #f5b5b5; }
.a-btn.sm { padding: 6px 11px; font-size: .8rem; }
.a-btn.icon { padding: 7px; }
.a-btn[disabled] { opacity: .55; pointer-events: none; }
.w-full { width: 100%; }

.a-field { display: grid; gap: 6px; font-weight: 700; font-size: .8rem; color: var(--ink); }
.a-field small { font-weight: 500; color: var(--mute); font-size: .76rem; }
.a-input, .a-field input, .a-field select, .a-field textarea {
  width: 100%; padding: 9px 12px; background: #fff; border: 1px solid #d5dce8; border-radius: 8px;
  font-weight: 500; color: var(--ink); outline: none; transition: .15s;
}
.a-field textarea { resize: vertical; line-height: 1.5; }
.a-input:focus, .a-field input:focus, .a-field select:focus, .a-field textarea:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(15, 85, 160, .12); }
.a-form { display: grid; gap: 14px; }
.a-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.a-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.a-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.a-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--p); }

.a-alert { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: .85rem; }
.a-alert.err { background: var(--danger-soft); color: #991b1b; }
.a-alert.ok { background: var(--ok-soft); color: #166534; }

.a-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 300; max-width: 380px; background: var(--ink); color: #fff;
  padding: 13px 18px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); font-weight: 600;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

.a-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.a-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.a-chip {
  padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .8rem; color: var(--text); transition: .15s;
}
.a-chip:hover { border-color: var(--p); color: var(--p); }
.a-chip.on { background: var(--p); border-color: var(--p); color: #fff; }
.a-chip sup { font-size: .68rem; opacity: .8; margin-left: 3px; }
.a-search { position: relative; min-width: 280px; }
.a-search input { padding-left: 36px; }
.a-search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--mute); width: 16px; height: 16px; }

/* ---------- Marka & katalog kartları ---------- */
.a-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.a-brand { display: flex; flex-direction: column; overflow: hidden; transition: .15s; }
.a-brand:hover { border-color: #b9c8de; box-shadow: 0 8px 24px rgba(15, 85, 160, .1); }
.a-brand-logo { height: 96px; display: grid; place-items: center; background: #f8fafc; border-bottom: 1px solid var(--line-soft); padding: 14px; }
.a-brand-logo img { max-height: 60px; max-width: 80%; object-fit: contain; }
.a-brand-body { padding: 14px 16px; flex: 1; display: grid; gap: 3px; align-content: start; }
.a-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p); }
.a-brand-body h3 { font-size: 1.05rem; color: var(--ink); }
.a-brand-body p { font-size: .82rem; color: var(--mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.a-meta { font-size: .76rem; color: var(--mute); margin-top: 6px; }
.a-brand-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.a-brand-foot .a-btn { flex: 1; }
.a-cat-cover { height: 130px; background: #0a1a30; position: relative; }
.a-cat-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.a-pill { position: absolute; top: 10px; right: 10px; background: var(--p); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; }

.a-slide { display: grid; grid-template-columns: 190px 1fr auto; gap: 20px; align-items: center; padding: 14px; }
.a-slide + .a-slide { margin-top: 12px; }
.a-slide img { width: 190px; height: 106px; object-fit: cover; border-radius: 8px; }
.a-slide h3 { color: var(--ink); font-size: 1.02rem; margin: 3px 0; }
.a-slide p { font-size: .84rem; color: var(--mute); }

.a-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.a-stack { display: grid; gap: 12px; }
.a-repeat { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.a-repeat-head { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 800; color: var(--ink); }
.a-link-danger { border: 0; background: none; color: var(--danger); font-weight: 700; font-size: .8rem; }

/* ---------- Harita ---------- */
.a-map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.a-map-box { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.a-map-box h4 { padding: 9px 13px; font-size: .78rem; background: #f8fafc; border-bottom: 1px solid var(--line); color: var(--ink); }
.a-map-box > div, .a-map-box iframe { height: 320px; width: 100%; border: 0; display: block; position: relative; z-index: 1; }
.a-resolve { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

/* ---------- E-Posta ---------- */
.mail-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mail-accounts { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-acc {
  display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 12px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 10px; font-weight: 700; font-size: .84rem; color: var(--ink); transition: .15s;
}
.mail-acc:hover { border-color: #b9c8de; }
.mail-acc.on { border-color: var(--p); background: var(--p-soft); box-shadow: 0 0 0 1px var(--p) inset; }
.mail-acc .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mail-acc small { display: block; font-weight: 500; color: var(--mute); font-size: .72rem; line-height: 1.2; }
.mail-acc .n { background: var(--danger); color: #fff; border-radius: 20px; font-size: .68rem; padding: 1px 7px; }

.mail-box { display: grid; grid-template-columns: 370px 1fr; height: calc(100vh - 250px); min-height: 520px; overflow: hidden; }
.mail-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.mail-tabs { display: flex; gap: 2px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.mail-tab {
  border: 0; background: transparent; padding: 8px 12px; font-weight: 700; font-size: .82rem; color: var(--mute);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.mail-tab:hover { color: var(--ink); }
.mail-tab.on { color: var(--p); border-bottom-color: var(--p); }
.mail-tab b { font-size: .68rem; background: var(--line-soft); padding: 1px 7px; border-radius: 20px; margin-left: 4px; }
.mail-tab.on b { background: var(--p-soft); color: var(--p); }
.mail-search { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.mail-rows { overflow-y: auto; flex: 1; }
.mail-row { padding: 13px 16px 13px 18px; border-bottom: 1px solid var(--line-soft); cursor: pointer; position: relative; display: grid; gap: 3px; }
.mail-row:hover { background: #f8fafc; }
.mail-row.on { background: var(--p-soft); }
.mail-row.unread::before { content: ""; position: absolute; left: 7px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--p); }
.mail-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mail-from { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 800; }
.mail-date { font-size: .72rem; color: var(--mute); flex-shrink: 0; }
.mail-subj { font-size: .84rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mail-snip { font-size: .78rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-badges { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.a-acc-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; color: var(--mute); }
.a-acc-tag i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.a-done { font-size: .66rem; font-weight: 800; color: var(--ok); background: var(--ok-soft); padding: 1px 7px; border-radius: 20px; }
.mail-empty { padding: 50px 24px; text-align: center; color: var(--mute); }

.mail-read { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.mail-placeholder { flex: 1; display: grid; place-content: center; text-align: center; gap: 8px; color: var(--mute); padding: 40px; }
.mail-placeholder .i { width: 44px; height: 44px; margin: 0 auto; color: #cbd5e1; stroke-width: 1.4; }
.mail-placeholder h3 { color: var(--ink); }
.mail-head { padding: 22px 28px 16px; border-bottom: 1px solid var(--line-soft); }
.mail-head-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.mail-head h2 { font-size: 1.25rem; color: var(--ink); line-height: 1.3; }
.mail-sender { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.mail-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.mail-sender a { color: var(--p); font-weight: 600; }
.mail-sender small { color: var(--mute); display: block; }
.mail-body { padding: 22px 28px; }
.mail-text { white-space: pre-wrap; line-height: 1.7; color: var(--ink); }
.mail-frame { width: 100%; min-height: 340px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mail-thread { padding: 0 28px 28px; display: grid; gap: 12px; }
.mail-thread h4 { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.mail-reply {
  border: 1px solid var(--line); border-left: 3px solid var(--p); border-radius: 8px; padding: 14px 16px; background: #f8fafc;
}
.mail-reply-top { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; color: var(--mute); margin-bottom: 6px; flex-wrap: wrap; }
.mail-reply-top b { color: var(--ink); }
.mail-reply a { color: var(--p); font-weight: 700; font-size: .78rem; text-decoration: underline; }

/* ---------- Modal ---------- */
.a-modal { position: fixed; inset: 0; z-index: 200; background: rgba(10, 26, 48, .55); display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.a-modal-card { width: 100%; max-width: 720px; background: var(--surface); border-radius: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.a-modal-card.wide { max-width: 820px; }
.a-modal-card.narrow { max-width: 440px; }
.a-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.a-modal-head h2 { font-size: 1.1rem; color: var(--ink); }
.a-x { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--mute); }
.a-modal-body { padding: 22px 24px; overflow-y: auto; display: grid; gap: 14px; }
.a-modal-foot { padding: 14px 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; align-items: center; }

.a-upload { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; background: #f8fafc; }
.a-upload-prev { height: 96px; background: #fff; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.a-upload-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.a-upload-prev.cover img { width: 100%; height: 100%; object-fit: cover; }
.a-upload-label { font-size: .78rem; font-weight: 800; color: var(--ink); }

/* hesap yönetimi */
.acc-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.acc-item .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.acc-item h4 { color: var(--ink); font-size: .95rem; }
.acc-item p { font-size: .8rem; color: var(--mute); }
.acc-item .grow { flex: 1; min-width: 0; }
.acc-badge { font-size: .66rem; font-weight: 800; padding: 2px 8px; border-radius: 20px; background: var(--line-soft); color: var(--mute); margin-left: 6px; }
.acc-badge.live { background: var(--ok-soft); color: var(--ok); }
.acc-badge.def { background: var(--p-soft); color: var(--p); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.quill-wrap .ql-container { height: 210px; font-family: inherit; font-size: .95rem; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.quill-wrap .ql-toolbar { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.attach-names { font-size: .78rem; font-weight: 700; color: var(--p); }

@media (max-width: 1100px) {
  .a-two, .a-map-grid { grid-template-columns: 1fr; }
  .mail-box { grid-template-columns: 320px 1fr; }
}
@media (max-width: 900px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px; }
  .a-nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .a-nav button { width: auto; }
  .a-nav-group, .a-side-foot { display: none; }
  .a-main { padding: 20px 16px 50px; }
  .mail-box { grid-template-columns: 1fr; height: auto; }
  .mail-list { max-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
  .a-grid-2, .a-grid-3, .a-resolve { grid-template-columns: 1fr; }
  .a-slide { grid-template-columns: 1fr; }
  .a-slide img { width: 100%; height: 150px; }
}

/* ---------- Resmi Logo, Haberler Yönetimi ve Resimli Mail İmzası ---------- */
.a-logo-img { height: 28px; width: auto; object-fit: contain; }
.a-side .a-logo-img { height: 24px; }
.a-side .a-side-logo-box {
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  justify-content: center;
}
.a-switch-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--p);
  border-radius: var(--r); margin-bottom: 20px; box-shadow: var(--shadow);
}
.a-switch-banner.off { border-left-color: var(--mute); background: #f8fafc; }
.a-switch-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 24px;
  background: var(--p-soft); color: var(--p); font-weight: 800; font-size: .84rem; cursor: pointer;
}
.a-switch-banner.off .a-switch-pill { background: var(--line); color: var(--text); }
.a-switch-pill input { width: 18px; height: 18px; accent-color: var(--p); cursor: pointer; }
.a-sig-preview {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fafc;
}
.a-sig-preview img { max-height: 110px; width: auto; max-width: 100%; border-radius: 4px; border: 1px solid var(--line); display: block; margin-top: 6px; }
