/* Agrobio Anonim Bildirim Sistemi
   Renkler logodan alınmıştır: arı sarısı + mürekkep siyahı. Harici font/kaynak yok (gizlilik). */

:root {
  --bee: #f6c000;
  --bee-600: #dca900;
  --bee-50: #fff8dc;
  --ink: #16140f;
  --ink-2: #2b2820;
  --text: #24221c;
  --muted: #6d685b;
  --line: #e7e1d1;
  --bg: #faf8f2;
  --card: #ffffff;
  --ok: #2f7d32;
  --ok-bg: #eaf5ea;
  --err: #b3261e;
  --err-bg: #fdecea;
  --warn-bg: #fff6d6;
  --info-bg: #eef3f8;
  --info: #2c5d8a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 20, 15, .05), 0 6px 24px rgba(22, 20, 15, .06);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--bee-600); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h2 { font-size: 1.45rem; }
h3, .h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--bee); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 4px solid var(--bee);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 8px 0; }
.brand img { display: block; height: 53px; width: auto; }
.brand-tag {
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px;
}
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a, .nav-btn {
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink);
  padding: 8px 14px; border-radius: 999px; text-decoration: none; background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .nav-btn:hover { background: var(--bee-50); }
.main-nav a.active { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23f6c000' stroke-opacity='.16' stroke-width='1.5'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23f6c000' stroke-opacity='.08' stroke-width='1.5'/%3E%3C/svg%3E");
  color: #f3efe3;
}
.hero-inner { padding-top: 72px; padding-bottom: 80px; max-width: 860px; margin-left: auto; margin-right: auto; text-align: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: #d9d3c2; max-width: 640px; margin: 0 auto 2em; }
.hero strong { color: var(--bee); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bee); margin-bottom: .8em; }
.eyebrow.dark { color: var(--muted); margin-bottom: .4em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.2;
  padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .05s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--bee); color: var(--ink); }
.btn-primary:hover { background: var(--bee-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { border-color: var(--bee); color: var(--bee); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #8f1e18; }
.danger-text { color: var(--err); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card > :last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.section-title { text-align: center; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.steps p { color: var(--muted); margin: 0; }
.step-no {
  display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px;
  background: var(--bee); color: var(--ink); font-weight: 800; font-family: var(--serif); font-size: 1.2rem;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}

/* ---------- Privacy ---------- */
.privacy { border-top: 4px solid var(--bee); }
.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checklist li { position: relative; padding: 10px 0 10px 36px; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bee); font-weight: 800; font-size: .8rem;
}

/* ---------- Forms ---------- */
.form .field { margin-bottom: 18px; }
.field label, .inline-field { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.inline-field { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; }
input[type=text], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1.5px solid #d8d1bd; border-radius: 10px; padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.inline-field select { width: auto; }
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(246, 192, 0, .35); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-foot p { margin: 0; flex: 1 1 260px; }
.counter { display: block; text-align: right; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.counter.near { color: var(--err); }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; }

/* ---------- Alerts ---------- */
.alert { border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; border-left: 5px solid; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { background: var(--ok-bg); border-color: var(--ok); }
.alert-err { background: var(--err-bg); border-color: var(--err); }
.alert-warn { background: var(--warn-bg); border-color: var(--bee); }
.alert-info { background: var(--info-bg); border-color: var(--info); }
main > .wrap > .alert { margin-top: 24px; margin-bottom: 0; }

/* ---------- Success / code ---------- */
.success-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--bee); color: var(--ink); font-size: 2rem; font-weight: 800;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.code-box {
  margin: 26px auto; padding: 22px; max-width: 460px; border-radius: var(--radius);
  background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.code-box .btn-dark { background: var(--bee); color: var(--ink); }
.code-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #bdb6a3; }
.code { font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 700; letter-spacing: .12em; color: var(--bee); user-select: all; }
.code-inline { background: var(--ink); color: var(--bee); padding: 2px 8px; border-radius: 6px; letter-spacing: .06em; }
.lookup-card, .login-card { max-width: 480px; margin: 0 auto; }

/* ---------- Detail / thread ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.detail-head h1 { margin-bottom: .3em; overflow-wrap: anywhere; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.detail-side .card { padding: 22px; }
.back { font-weight: 600; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--ink); }

.thread { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); background: #fff; max-width: 92%; }
.msg-employee { align-self: flex-start; border-left: 5px solid #b9b19c; }
.msg-admin { align-self: flex-end; background: var(--bee-50); border-color: #f0dc95; border-left: 5px solid var(--bee); }
.msg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; font-size: .92rem; }
.msg-head time { margin-left: auto; color: var(--muted); font-size: .85rem; }
.msg-first { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--ink); color: var(--bee); padding: 2px 8px; border-radius: 999px; }
.msg-body { overflow-wrap: anywhere; }
.area-admin .msg-employee { align-self: flex-end; }
.area-admin .msg-admin { align-self: flex-start; }

.progress { list-style: none; display: flex; margin: 0 0 26px; padding: 0; counter-reset: s; }
.progress li { flex: 1; text-align: center; font-size: .85rem; font-weight: 600; color: var(--muted); position: relative; padding-top: 26px; }
.progress li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.progress li.done, .progress li.current { color: var(--ink); }
.progress li.done::before, .progress li.current::before { background: var(--ink); }
.progress li.done .dot { background: var(--ink); border-color: var(--ink); }
.progress li.current .dot { background: var(--bee); border-color: var(--ink); }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge-yeni { background: var(--bee); color: var(--ink); }
.badge-inceleniyor { background: #dbe8f5; color: #1d4a73; }
.badge-yanitlandi { background: #e4dcf5; color: #4a2e83; }
.badge-cozuldu { background: var(--ok-bg); color: var(--ok); }
.badge-kapatildi { background: #ebe8e1; color: #5d584c; }

/* ---------- Admin list ---------- */
.page-head { margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  display: flex; flex-direction: column; padding: 18px 20px; border-radius: var(--radius); text-decoration: none;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .15s;
}
.stat:hover, .stat.is-active { border-color: var(--ink); }
.stat:first-child { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat:first-child .stat-n { color: var(--bee); }
.stat:first-child .stat-l { color: #cfc8b5; }
.stat-n { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat-l { font-size: .85rem; color: var(--muted); font-weight: 600; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.tabs a span { font-size: .78rem; background: #efebe0; color: var(--ink); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.tabs a:hover { color: var(--ink); background: #fff; }
.tabs a.active { background: var(--ink); color: #fff; }
.tabs a.active span { background: var(--bee); }

.filters { display: grid; grid-template-columns: 2fr 1.3fr 1fr auto auto; gap: 10px; margin-bottom: 18px; }
.filters input, .filters select { padding: 9px 12px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fbfaf6; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid #f0ece1; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fdfcf7; }
.table .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.table .subject a { font-weight: 600; text-decoration: none; }
.table .subject a:hover { text-decoration: underline; }
.table tr.is-unread { background: #fffbea; }
.table tr.is-unread td:first-child { box-shadow: inset 4px 0 0 var(--bee); }
.dot-new { display: inline-block; margin-left: 8px; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--ink); background: var(--bee); padding: 1px 7px; border-radius: 999px; }
.empty { padding: 48px; color: var(--muted); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.pagination a { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: 8px; text-decoration: none; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.pagination a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.danger-zone summary { cursor: pointer; font-weight: 700; color: var(--err); }
.danger-zone[open] summary { margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #a8a291; font-size: .88rem; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.footer-note::before { content: "⬢ "; color: var(--bee); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .section { padding-top: 26px; padding-bottom: 26px; }
  .card { padding: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .brand img { height: 44px; }
  .header-inner { min-height: 60px; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; }
  .hero-actions .btn { width: 100%; }
  .form-foot .btn { width: 100%; }
  .detail-head { flex-direction: column; }
  .msg { max-width: 100%; }
  .progress li { font-size: .72rem; }
  .table th:nth-child(3), .table td:nth-child(3), .table th:nth-child(4), .table td:nth-child(4), .table th:nth-child(6), .table td:nth-child(6) { display: none; }
}
