/* ===== Okyanus teması — açık, ferah, modern ===== */
:root {
  --bg: #f0f9ff;
  --bg-grad: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
  --card: #ffffff;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #14b8a6;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --ring: rgba(14, 165, 233, 0.18);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);

  --plan: #f59e0b;     /* Planlandı */
  --yapildi: #6366f1;  /* Yapıldı */
  --paylasildi: #10b981; /* Paylaşıldı */
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-grad);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ---- Üst menü ---- */
.nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 22px;
}
.brand {
  font-weight: 800; font-size: 18px; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.brand .dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.nav a.link { color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a.link:hover { color: var(--primary-dark); text-decoration: none; }
.nav .spacer { flex: 1; }

/* ---- Düzen ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; }
.page-head .spacer { flex: 1; }
.subtle { color: var(--muted); font-size: 14px; }

/* ---- Kartlar ---- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 18px;
}
.firma-card { position: relative; overflow: hidden; transition: transform .12s ease, box-shadow .12s ease; }
.firma-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15,23,42,.10); }
.firma-card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.firma-card h3 { margin: 0 0 4px; font-size: 18px; }
.firma-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.count-pill {
  display: flex; align-items: center; gap: 6px;
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600;
}
.count-pill .num { font-size: 14px; }

/* ---- Rozetler ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #fff;
}
.badge.plan { background: var(--plan); }
.badge.yapildi { background: var(--yapildi); }
.badge.paylasildi { background: var(--paylasildi); }
.badge.soft { background: #f1f5f9; color: var(--muted); }
.badge.onay-bekliyor { background: #fef3c7; color: #92400e; }
.badge.onaylandi { background: #d1fae5; color: #065f46; }
.badge.revizyon { background: #fee2e2; color: #991b1b; }
.dot-status { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.warn-tag {
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

/* ---- Butonlar ---- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 9px 15px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all .12s ease; text-decoration: none;
}
.btn:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border: none; box-shadow: 0 4px 14px var(--ring);
}
.btn.primary:hover { filter: brightness(1.04); color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; border-color: var(--danger); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Tablolar / listeler ---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.row-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.row-item .grow { flex: 1; min-width: 0; }
.row-item .title { font-weight: 600; }
.row-item .sub { color: var(--muted); font-size: 13px; }
.row-item.tarihsiz { border-style: dashed; background: #fffdf7; }

/* ---- Formlar ---- */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring);
}
.field textarea { resize: vertical; min-height: 80px; }

/* ---- Düzenleme yan paneli (firma brief) ---- */
.split { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.brief { position: sticky; top: 80px; }
.brief h4 { margin: 0 0 12px; }
.brief .b-row { margin-bottom: 10px; }
.brief .b-label { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
.brief .b-val { font-size: 14px; white-space: pre-wrap; }
.brief .donts { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px; color: #991b1b; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card .dot { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); }
.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 10px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }

/* ---- Takvim ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.cal-col { background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-height: 160px; padding: 10px; }
.cal-col.today { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.cal-head { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.cal-event { border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; font-size: 12px; color: #fff; display: block; }
.cal-event .t { font-weight: 700; opacity: .9; font-size: 11px; }
.cal-event:hover { text-decoration: none; filter: brightness(1.05); color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---- Aylık takvim ---- */
.month { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.month-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8fafc; border-bottom: 1px solid var(--border); }
.month-weekdays .wd { padding: 9px 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.month-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-cell { min-height: 108px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 6px 8px; }
.month-week:last-child .month-cell { border-bottom: none; }
.month-cell:nth-child(7n) { border-right: none; }
.month-cell.out-month { background: #fafbfc; }
.month-cell.out-month .day-num { color: #cbd5e1; }
.month-cell.today { background: #eff8ff; }
.day-num { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 5px; min-height: 20px; }
.month-cell.today .day-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; background: var(--primary); color: #fff; border-radius: 50%;
}
.m-event {
  display: block; font-size: 11px; color: #fff; border-radius: 6px; padding: 2px 6px;
  margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.m-event .t { font-weight: 700; opacity: .9; }
.m-event:hover { text-decoration: none; filter: brightness(1.05); color: #fff; }

/* ---- İlerleme çubuğu ---- */
.progress { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s ease; }
input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }

/* ---- Süreç takip timeline ---- */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--border);
}
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-top: 3px; flex-shrink: 0; z-index: 1; }
.tl-body { flex: 1; }
.tl-text { white-space: pre-wrap; }
.tl-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; }

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .brief { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: 1fr; }
  .month { overflow-x: auto; }
  .month-weekdays, .month-week { min-width: 720px; }
}
