@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Plus+Jakarta+Sans:wght@300;400;600&display=swap');

:root {
  --bg: #f6efe7;
  --card: #fff8f1;
  --cocoa: #5a3a2e;
  --caramel: #c58b57;
  --milk: #fffdf8;
  --ink: #2f211b;
  --muted: #7b6a5f;
  --accent: #d7a773;
  --accent-2: #eac8a1;
  --ok: #2f7b4f;
  --warn: #c36c2b;
  --error: #b0392a;
  --shadow: 0 10px 30px rgba(53, 34, 25, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
body.bg {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 10% -10%, #fff7ed 0%, #f6efe7 60%, #f1e4d8 100%);
  color: var(--ink);
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--cocoa);
  font-size: 20px;
}

.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--milk), #fff1e4);
  border-bottom: 1px solid #f1dcc8;
  position: sticky;
  top: 0;
}

.pill {
  margin-left: auto;
  background: #fff0e2;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--cocoa);
  font-size: 13px;
}

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.container.narrow { max-width: 520px; }

.section { margin-bottom: 32px; }

.card {
  background: var(--card);
  border: 1px solid #f1dcc8;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.label { font-weight: 600; color: var(--cocoa); }
.muted { color: var(--muted); font-size: 14px; }
.stat { margin-top: 6px; font-weight: 600; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; margin-top: 8px; }
.badge.ok { background: #e3f3e8; color: var(--ok); }
.badge.warn { background: #fff1e5; color: var(--warn); }

.alert { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.alert.warn { background: #fff1e5; color: var(--warn); border: 1px solid #f3d2b5; }
.alert.error { background: #ffe7e4; color: var(--error); border: 1px solid #f4c0b8; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

h1, h2 { font-family: 'Fraunces', serif; color: var(--cocoa); margin: 0 0 12px; }

label { display: block; font-size: 13px; margin: 10px 0 6px; color: var(--cocoa); }
input, select, textarea {
  width: 100%;
  border: 1px solid #e5cdb8;
  background: var(--milk);
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

.btn {
  display: inline-block;
  background: #fff;
  border: 1px solid #e5cdb8;
  color: var(--cocoa);
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 10px;
}
.btn.primary { background: linear-gradient(180deg, #d7a773, #c58b57); color: #fff; border: none; }
.btn.ghost { background: transparent; border: 1px dashed #d6b597; }

.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; margin-bottom: 12px; }
.totals { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 16px; }

.table { display: grid; gap: 8px; }
.thead, .trow {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
}
.thead { font-weight: 700; color: var(--cocoa); background: #fff1e4; border-radius: 12px; }
.trow { background: #fff; border: 1px solid #f1dcc8; border-radius: 12px; }


@media (max-width: 720px) {
  body.bg { font-size: 15px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .brand { font-size: 18px; width: 100%; }
  .btn.ghost { padding: 8px 10px; font-size: 13px; }
  .pill { width: 100%; order: 3; margin: 0; }

  .admin-layout { grid-template-columns: 1fr; gap: 12px; }
  .sidebar { position: static; padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sidebar-title { grid-column: 1 / -1; margin-bottom: 4px; font-size: 14px; }
  .side-link { text-align: center; padding: 10px 8px; font-size: 12px; border-radius: 10px; }
  .side-link .side-ico { display: block; margin: 0 auto 4px; }

  .section { margin-bottom: 20px; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-title { font-size: 14px; }
  .metric-value { font-size: 22px; }

  .grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }

  .table .thead { display: none; }
  .trow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .trow > div { background: #fffaf3; border-radius: 8px; padding: 6px 8px; }
  .trow > div:nth-child(1)::before { content: 'Tarih'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(2)::before { content: 'Şube'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(3)::before { content: 'Kredi Kartı'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(4)::before { content: 'Nakit'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(5)::before { content: 'Durum'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(6)::before { content: 'İşlem'; display:block; font-size:12px; color:var(--muted); }

  .staff-item { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}
  .pill { order: 2; width: 100%; margin-left: 0; }
  .thead, .trow { grid-template-columns: 1fr 1fr; }
}


.alert.ok { background: #e9f7ef; color: var(--ok); border: 1px solid #cfe8d9; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.metric-card { background: #fff7ee; border: 1px solid #f1dcc8; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s ease; }
.metric-card:hover { transform: translateY(-2px); }
.metric-title { color: var(--cocoa); font-weight: 700; margin-bottom: 8px; }
.metric-value { font-size: 24px; font-weight: 700; color: var(--ink); }
.metric-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.metric-card.revealed .metric-hint { opacity: 0.6; }

.choice-row { display: flex; gap: 12px; flex-wrap: wrap; }
.choice { background: #fff2e6; border: 1px solid #f1dcc8; padding: 8px 12px; border-radius: 999px; font-size: 13px; }

.avatar-option input { width: auto; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.avatar-label { font-size: 12px; color: var(--muted); }
.avatar.truffle { background: linear-gradient(135deg, #5a3a2e, #8a5a44); }
.avatar.caramel { background: linear-gradient(135deg, #c58b57, #e3b076); }
.avatar.ruby { background: linear-gradient(135deg, #b85c70, #e38ba1); }
.avatar.hazelnut { background: linear-gradient(135deg, #8d6a4b, #b58b63); }
.avatar.mocha { background: linear-gradient(135deg, #6c4a3a, #9b6f5a); }
.avatar.vanilla { background: linear-gradient(135deg, #e7c9a6, #f1ddc5); color: #5a3a2e; }

.staff-form, .staff-edit { display: grid; gap: 8px; }
.staff-list { display: grid; gap: 16px; margin-top: 10px; }
.staff-item { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid #f1dcc8; border-radius: 14px; background: #fff; }
.staff-meta { display: grid; gap: 4px; }


@media (max-width: 720px) {
  body.bg { font-size: 15px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .brand { font-size: 18px; width: 100%; }
  .btn.ghost { padding: 8px 10px; font-size: 13px; }
  .pill { width: 100%; order: 3; margin: 0; }

  .admin-layout { grid-template-columns: 1fr; gap: 12px; }
  .sidebar { position: static; padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sidebar-title { grid-column: 1 / -1; margin-bottom: 4px; font-size: 14px; }
  .side-link { text-align: center; padding: 10px 8px; font-size: 12px; border-radius: 10px; }
  .side-link .side-ico { display: block; margin: 0 auto 4px; }

  .section { margin-bottom: 20px; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-title { font-size: 14px; }
  .metric-value { font-size: 22px; }

  .grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }

  .table .thead { display: none; }
  .trow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .trow > div { background: #fffaf3; border-radius: 8px; padding: 6px 8px; }
  .trow > div:nth-child(1)::before { content: 'Tarih'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(2)::before { content: 'Şube'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(3)::before { content: 'Kredi Kartı'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(4)::before { content: 'Nakit'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(5)::before { content: 'Durum'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(6)::before { content: 'İşlem'; display:block; font-size:12px; color:var(--muted); }

  .staff-item { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}
}


.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.sidebar { position: sticky; top: 84px; background: #fff7ee; border: 1px solid #f1dcc8; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.sidebar-title { font-weight: 700; color: var(--cocoa); margin-bottom: 10px; }
.side-link { display: block; padding: 10px 12px; border-radius: 10px; color: var(--cocoa); text-decoration: none; border: 1px solid transparent; margin-bottom: 6px; background: #fff; }
.side-link:hover { border-color: #f1dcc8; }
.side-link.active { background: #fff1e4; border-color: #f1dcc8; font-weight: 700; }
.main { min-width: 0; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .side-link { margin: 0; text-align: center; }
}


.side-ico { display: inline-block; width: 20px; text-align: center; margin-right: 6px; }


.side-ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 8px; }
.side-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--cocoa); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.avatar-option { grid-template-columns: 1fr; }
.avatar-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-option { cursor: pointer; border: 1px solid #f1dcc8; }

.choice { cursor: pointer; }
.choice input { margin-right: 6px; }


@media (max-width: 720px) {
  body.bg { font-size: 15px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .brand { font-size: 18px; width: 100%; }
  .btn.ghost { padding: 8px 10px; font-size: 13px; }
  .pill { width: 100%; order: 3; margin: 0; }

  .admin-layout { grid-template-columns: 1fr; gap: 12px; }
  .sidebar { position: static; padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sidebar-title { grid-column: 1 / -1; margin-bottom: 4px; font-size: 14px; }
  .side-link { text-align: center; padding: 10px 8px; font-size: 12px; border-radius: 10px; }
  .side-link .side-ico { display: block; margin: 0 auto 4px; }

  .section { margin-bottom: 20px; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-title { font-size: 14px; }
  .metric-value { font-size: 22px; }

  .grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }

  .table .thead { display: none; }
  .trow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .trow > div { background: #fffaf3; border-radius: 8px; padding: 6px 8px; }
  .trow > div:nth-child(1)::before { content: 'Tarih'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(2)::before { content: 'Şube'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(3)::before { content: 'Kredi Kartı'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(4)::before { content: 'Nakit'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(5)::before { content: 'Durum'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(6)::before { content: 'İşlem'; display:block; font-size:12px; color:var(--muted); }

  .staff-item { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}
  .brand { font-size: 18px; }
  .pill { width: 100%; order: 3; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; padding: 10px; }
  .sidebar-title { margin-bottom: 6px; }
  .sidebar { display: flex; gap: 8px; overflow-x: auto; }
  .side-link { white-space: nowrap; min-width: max-content; padding: 8px 10px; font-size: 13px; }
  .cards { grid-template-columns: 1fr; }
  .metric-card { padding: 14px; }
  .table .thead { display: none; }
  .trow { grid-template-columns: 1fr 1fr; }
  .trow > div:nth-child(1)::before { content: 'Tarih'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(2)::before { content: 'Şube'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(3)::before { content: 'Kredi Kartı'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(4)::before { content: 'Nakit'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(5)::before { content: 'Durum'; display:block; font-size:12px; color:var(--muted); }
  .trow > div:nth-child(6)::before { content: 'İşlem'; display:block; font-size:12px; color:var(--muted); }
  .trow { gap: 6px; }
}




.ico { width: 18px; height: 18px; fill: none; stroke: var(--cocoa); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }


.staff-list.compact { display: grid; gap: 12px; }
.staff-row { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid #f1dcc8; border-radius: 12px; background: #fff; }
.staff-actions { display: flex; gap: 8px; align-items: center; }
.staff-actions form { margin: 0; }
.btn.danger { background: #ffe7e4; color: #9b2b1f; border: 1px solid #f4c0b8; }
.staff-edit.hidden { display: none; margin-top: 10px; }
.staff-edit.show { display: grid; gap: 8px; }

@media (max-width: 720px) {
  .staff-row { grid-template-columns: 1fr; align-items: start; }
  .staff-actions { width: 100%; justify-content: flex-start; }
}


.avatar.plain { background: #e9d6c2; color: #5a3a2e; }


.segmented { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.segmented label { display: flex; gap: 8px; align-items: center; background: #fffaf3; border: 1px solid #f1dcc8; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.segmented input { width: auto; }

@media (max-width: 720px) {
  .segmented { grid-template-columns: 1fr; }
}


.entry-card { display: grid; gap: 8px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.stats-row div { background: #fffaf3; border: 1px solid #f1dcc8; border-radius: 10px; padding: 8px; display: grid; gap: 4px; }
.stats-row span { font-size: 12px; color: var(--muted); }
.stats-row strong { font-size: 15px; color: var(--cocoa); }

@media (max-width: 720px) {
  .stats-row { grid-template-columns: 1fr; }
}


@media (max-width: 720px) {
  .auth-wrap { place-items: start; padding-top: 40px; }
  .auth-wrap .brand { margin-bottom: 12px; }
  .auth-wrap .card { margin-top: 8px; }
}


@media (max-width: 720px) {
  body.bg .auth-wrap { min-height: auto; display: block; padding: 24px 16px 16px; }
  body.bg .auth-wrap .brand { margin: 8px 0 10px; }
  body.bg .auth-wrap .card { margin: 0; }
}


.label-ico { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cocoa); opacity: 0.9; }
.label-ico .ico { width: 16px; height: 16px; stroke: var(--cocoa); fill: none; stroke-width: 1.6; }
.stats-row strong { font-size: 16px; }
