/* Atlas Yacht Management — deniz haritası kâğıdı ve seyir fenerleri */
:root {
  --paper: #eaf0f3;
  --surface: #ffffff;
  --surface-2: #f4f8f9;
  --ink: #102a3f;
  --ink-2: #4b6173;
  --ink-3: #74889a;
  --line: #d2dde3;
  --line-strong: #b7c7d1;
  --accent: #0b6e8a;
  --accent-hover: #095a71;
  --accent-ink: #ffffff;
  --accent-soft: #dbedf2;
  --red: #c2362b;
  --red-soft: #fbe6e3;
  --amber: #b67a06;
  --amber-soft: #fbf0d9;
  --green: #1f8456;
  --green-soft: #e0f2e9;
  --grey-soft: #e9eef1;
  --focus: #e0a100;
  --shadow: 0 1px 2px rgba(16, 42, 63, .06), 0 8px 24px rgba(16, 42, 63, .08);
  --radius: 10px;
  --radius-sm: 6px;
  --side: 248px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1922; --surface: #13242f; --surface-2: #182d3a; --ink: #e5eef3; --ink-2: #a3b6c3; --ink-3: #7d93a3;
    --line: #243c4b; --line-strong: #33505f; --accent: #52b6d1; --accent-hover: #74c7dd; --accent-ink: #062530; --accent-soft: #15394a;
    --red: #f2786b; --red-soft: #3a1e1c; --amber: #ecb84f; --amber-soft: #3a2f15; --green: #55c792; --green-soft: #143528; --grey-soft: #1d3240;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1922; --surface: #13242f; --surface-2: #182d3a; --ink: #e5eef3; --ink-2: #a3b6c3; --ink-3: #7d93a3;
  --line: #243c4b; --line-strong: #33505f; --accent: #52b6d1; --accent-hover: #74c7dd; --accent-ink: #062530; --accent-soft: #15394a;
  --red: #f2786b; --red-soft: #3a1e1c; --amber: #ecb84f; --amber-soft: #3a2f15; --green: #55c792; --green-soft: #143528; --grey-soft: #1d3240;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.block { display: block; }
.late { color: var(--red); font-weight: 600; }
.warn-text { color: var(--amber); font-weight: 600; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px 12px; overflow-y: auto;
}
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 16px; }
.brand-word { font: 700 22px/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.brand-word::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 13px 0 0 var(--red); vertical-align: 3px; margin-right: 22px; }
.brand-sub { font-size: 12px; color: var(--ink-3); }
.menu-anchor { position: relative; }
.vessel-switch {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2); cursor: pointer; text-align: left;
}
.vessel-switch:hover { border-color: var(--line-strong); }
.vessel-photo, .vessel-mark { width: 38px; height: 38px; border-radius: 8px; flex: none; object-fit: cover; }
.vessel-mark { display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.vessel-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vessel-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vessel-name small { color: var(--ink-3); font-size: 12px; }
.side-nav { margin-top: 14px; flex: 1; }
.side-nav ul { list-style: none; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }
.side-nav ul:first-child { border-top: 0; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500;
}
.side-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); }
.side-nav a.on svg { stroke-width: 2.2; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.user-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.user-btn:hover { background: var(--surface-2); }
.user-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

.body { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 28px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top-vessel { display: none; font-weight: 600; }
.menu-toggle { display: none; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-3); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.global-search { flex: 1; border: 0; outline: 0; background: none; min-width: 0; height: 100%; color: var(--ink); }
.search kbd { font: 12px var(--font); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; color: var(--ink-3); }
.topbar > .menu-anchor:last-child { margin-left: auto; }
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.main { flex: 1; padding: 26px 28px 60px; outline: 0; }
.scrim { display: none; }

/* Açılır menüler */
.menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-up { top: auto; bottom: calc(100% + 6px); }
.menu-label { padding: 6px 10px; font-size: 12px; color: var(--ink-3); }
.menu-empty { padding: 10px; color: var(--ink-2); }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.on { font-weight: 600; color: var(--accent); }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; }
.bell-panel { right: 0; left: auto; width: min(380px, 90vw); max-height: 70vh; overflow: auto; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-item { display: block; padding: 9px 10px 9px 14px; border-radius: 6px; color: var(--ink); border-left: 3px solid var(--line-strong); margin: 2px 0; }
.bell-item:hover { background: var(--surface-2); text-decoration: none; }
.bell-item strong { display: block; }
.bell-item span { font-size: 13px; color: var(--ink-2); }
.sev-high.bell-item, .att-list .sev-high a { border-left-color: var(--red); }
.sev-medium.bell-item, .att-list .sev-medium a { border-left-color: var(--amber); }
.sev-low.bell-item, .att-list .sev-low a { border-left-color: var(--accent); }
.search-results { right: 0; max-height: 60vh; overflow: auto; }
.search-item { display: grid; grid-template-columns: 90px 1fr; gap: 2px 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); }
.search-item:hover, .search-item.on { background: var(--accent-soft); text-decoration: none; }
.search-item small { grid-column: 2; color: var(--ink-3); }
.search-type { color: var(--ink-3); font-size: 13px; grid-row: span 2; }

/* ---------- Sayfa başlığı ---------- */
.page { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title h1 { font-size: 28px; font-weight: 650; letter-spacing: -.015em; }
.page-sub { color: var(--ink-2); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.num { color: var(--ink-3); font-weight: 500; margin-right: 6px; }
.num-lg { font-weight: 400; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost-danger { background: var(--surface); color: var(--red); border-color: var(--line); }
.btn-ghost-danger:hover { border-color: var(--red); }
.btn-link { background: none; color: var(--accent); padding: 0; min-height: 30px; margin-top: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--accent-ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px; font-weight: 500; }
.link-btn.on { font-weight: 700; text-decoration: underline; }

/* ---------- Filtreler ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; color: var(--ink-2); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--grey-soft); border-radius: 9px; }
.page > .seg { margin-bottom: 12px; }
.seg-item { border: 0; background: none; padding: 6px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg-item:hover { color: var(--ink); }
.seg-item.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 42, 63, .12); }
.seg-sm .seg-item { padding: 4px 9px; font-size: 13px; }
.seg-form { display: flex; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.filter { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-3); }
.filter select, .filter input { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px; font-size: 14px; color: var(--ink); min-width: 140px; }
.search-filter { flex-direction: row; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 220px; }
.search-filter input { border: 0; height: 34px; padding: 0; min-width: 0; flex: 1; outline: 0; }
.search-filter:focus-within { border-color: var(--accent); }
.chip { height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.period { display: flex; align-items: flex-end; gap: 2px; }

/* ---------- Paneller ve listeler ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 16px; font-weight: 650; }
.panel-head a { font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.narrow { max-width: 720px; }
.simple-list, .att-list, .dept-list { list-style: none; margin: 0; padding: 0; }
.simple-list li + li, .dept-list li + li { border-top: 1px solid var(--line); }
.simple-list a, .dept-list a { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 10px 2px; color: var(--ink); }
.simple-list a:hover, .dept-list a:hover { text-decoration: none; background: var(--surface-2); }
.simple-list strong { flex: 1; min-width: 140px; font-weight: 600; }
.list-meta { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; }
.invite-row strong { flex: 1; }
.att-list li + li { margin-top: 6px; }
.att-list a { display: grid; grid-template-columns: 96px 1fr; gap: 1px 12px; padding: 10px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--ink); }
.att-list a:hover { text-decoration: none; background: var(--accent-soft); }
.att-type { grid-row: span 2; font-size: 13px; color: var(--ink-3); padding-top: 1px; }
.att-why { font-size: 13px; color: var(--ink-2); }
.dept-list a { display: grid; grid-template-columns: 18px 1fr auto; }
.dept-list .warn-text { grid-column: 2 / -1; font-size: 13px; }
.dept-list span:not(.signal):not(.warn-text) { color: var(--ink-2); font-size: 14px; }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.facts dt { color: var(--ink-3); font-size: 14px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -6px 0 18px; }
.status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 10px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline.compact li { padding-bottom: 8px; font-size: 14px; }
.detail-photo { width: 100%; border-radius: var(--radius); margin-bottom: 18px; border: 1px solid var(--line); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.file-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.file-link small { color: var(--ink-3); }
.file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }

/* Rozetler ve sinyaller */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge-neutral { background: var(--grey-soft); color: var(--ink-2); }
.badge-info { background: var(--accent-soft); color: var(--accent); }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--red-soft); color: var(--red); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.signal { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.signal i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sig-red i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sig-red { color: var(--red); }
.sig-amber i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.sig-amber { color: var(--amber); }
.sig-green i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.sig-green { color: var(--green); }
.sig-grey i { background: var(--ink-3); }
.sig-grey { color: var(--ink-3); }
.count-pill { display: inline-block; min-width: 20px; margin-left: 8px; padding: 0 6px; border-radius: 10px; background: var(--grey-soft); color: var(--ink-2); font-size: 12px; text-align: center; }

/* ---------- Tablo ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.panel .table-wrap { border: 0; border-radius: 0; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .row-link { color: var(--ink); font-weight: 600; }
.table tr.row-alert td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.cell-title { display: inline-flex; flex-direction: column; }
.cell-title > .num { display: inline; }
.cell-title small { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.num-col { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.row-actions .btn { min-height: 32px; padding: 0 10px; font-size: 14px; }
.qty b { font-size: 16px; }
.list-more { padding-top: 12px; text-align: center; }

/* ---------- Panel sayfası ---------- */
.bridge { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.bridge-date { color: var(--ink-2); text-transform: none; }
.bridge h1 { font-size: 34px; font-weight: 650; letter-spacing: -.02em; margin: 2px 0 4px; }
.bridge-sub { color: var(--ink-2); font-size: 16px; }
.board {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 18px; overflow: hidden;
}
.board-cell { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 22px 18px; color: var(--ink); border-left: 1px solid var(--line); }
.board-cell:first-child { border-left: 0; }
.board-cell::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--line); }
.board-cell.is-red::before { background: var(--red); }
.board-cell.is-amber::before { background: var(--amber); }
.board-cell:hover { background: var(--surface-2); text-decoration: none; }
.board-num { font: 650 40px/1.05 var(--font-display); letter-spacing: -.03em; }
.is-red .board-num { color: var(--red); }
.is-amber .board-num { color: var(--amber); }
.board-money .board-num { font-size: 28px; display: flex; flex-direction: column; padding: 6px 0 4px; }
.board-label { font-weight: 600; }
.board-meta { color: var(--ink-3); font-size: 13px; }
.cert-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cert-counts a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
.cert-counts a:hover { text-decoration: none; background: var(--accent-soft); }
.cert-counts b { font-size: 22px; color: var(--ink); }
.cert-counts .amber b { color: var(--amber); }
.cert-counts .red b { color: var(--red); }
.stock-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: -4px 0 20px; }
.stock-hero.is-red .board-num { color: var(--red); }
.stock-hero.is-amber .board-num { color: var(--amber); }
.totals { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.totals .money { font: 650 22px var(--font-display); }

/* Hareketler, yorumlar */
.act-list, .comments { list-style: none; margin: 0; padding: 0; }
.act, .comments li { display: flex; gap: 12px; padding: 12px 0; }
.act + .act, .comments li + li { border-top: 1px solid var(--line); }
.act-body { min-width: 0; }
.act-meta, .comment-meta { display: flex; gap: 10px; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.comment-meta { margin: 0 0 3px; }
.comment-meta strong { color: var(--ink); }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.comment-form textarea { flex: 1; }

/* Mürettebat */
.people { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.person.off { opacity: .6; }
.person-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.person-body a { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.person-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.link-box { display: grid; gap: 10px; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }

/* Makine ağacı */
.tree { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px dashed var(--line-strong); }
.panel > .tree { border-left: 0; padding-left: 0; }
.tree li { padding: 2px 0; }
.tree-node { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.tree-node:hover { background: var(--surface-2); text-decoration: none; }

/* Ayarlar listesi */
.edit-list { list-style: none; margin: 12px 0; padding: 0; }
.edit-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.edit-list li.off .edit-name { color: var(--ink-3); }
.edit-name { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; }

/* ---------- Formlar ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.field.half { grid-column: span 1; }
.field[hidden] { display: none; }
.field > label, .field .label { font-weight: 600; font-size: 14px; }
.opt { font-weight: 400; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[disabled], select[disabled] { background: var(--surface-2); color: var(--ink-3); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field-check label { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.field-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hint { color: var(--ink-3); font-size: 13px; }
.form-subhead { font-size: 14px; font-weight: 650; grid-column: 1 / -1; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.form-error { padding: 10px 12px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-weight: 500; }
.form-error[hidden] { display: none; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.more { border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
.more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: 8px; color: var(--ink-2); cursor: pointer; text-align: center; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 3px 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; max-width: 100%; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.file-chip.busy { opacity: .6; }
.file-chip .icon-btn { width: 26px; height: 26px; }
.thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(8, 22, 32, .45); overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); animation: rise .16s ease-out; }
.modal-wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px 22px; }
.modal-head h2 { font-size: 19px; font-weight: 650; }
.modal-body { padding: 4px 22px 22px; }
.confirm-text { margin-bottom: 16px; color: var(--ink-2); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Bildirim */
.toasts { position: fixed; z-index: 80; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 500; box-shadow: var(--shadow); transition: opacity .3s; }
.toast-error { background: var(--red); color: #fff; }
.toast.out { opacity: 0; }

/* Boş durum, yükleniyor, hata */
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.panel .empty { border: 0; padding: 18px 10px; background: none; }
.empty-title { color: var(--ink); font-weight: 650; font-size: 16px; }
.empty .btn { margin-top: 10px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px; color: var(--ink-3); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-right-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.error-box { padding: 14px 16px; border-radius: 8px; background: var(--red-soft); color: var(--red); }

/* ---------- Giriş ekranları ---------- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px;
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, color-mix(in srgb, var(--line) 55%, transparent) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, color-mix(in srgb, var(--line) 55%, transparent) 47px 48px),
    var(--paper);
}
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 28px 24px; box-shadow: var(--shadow); }
.brand-auth { padding: 0 0 22px; }
.auth-card h1 { font-size: 24px; font-weight: 650; margin-bottom: 6px; }
.auth-sub { color: var(--ink-2); margin-bottom: 20px; }
.auth-card .form-actions .btn-primary { width: 100%; min-height: 44px; }
.auth-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.auth-lang { margin-top: 16px; display: flex; gap: 10px; }
.vessel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vessel-list a { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.vessel-list a:hover { border-color: var(--accent); text-decoration: none; }
.vessel-list small { grid-column: 2; color: var(--ink-3); }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .grid-2, .detail-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .board-cell:nth-child(3) { border-left: 0; }
  .board-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(8, 22, 32, .4); }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 8px 16px; }
  .main { padding: 18px 16px 50px; }
  .search kbd { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .top-vessel { display: none; }
  .page-title h1 { font-size: 23px; }
  .bridge h1 { font-size: 26px; }
  .board-num { font-size: 32px; }
  .board-cell { padding: 16px 14px 14px; }
  .form-grid, .more-body { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .filters > * { flex: 1 1 140px; }
  .search-filter { min-width: 0; flex-basis: 100%; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .hide-sm { display: none; }
  /* Tablolar kart görünümüne geçer */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: 13px; text-align: left; }
  .table td:first-child { display: block; text-align: left; padding-bottom: 6px; }
  .table td:first-child::before { content: none; }
  .table td[data-label=""]::before { content: none; }
  .table td:empty { display: none; }
  .table tr.row-alert td:first-child, .table tr.row-warn td:first-child { box-shadow: none; }
  .table tr.row-alert { box-shadow: inset 3px 0 0 var(--red); }
  .table tr.row-warn { box-shadow: inset 3px 0 0 var(--amber); }
  .att-list a { grid-template-columns: 1fr; }
  .att-type { grid-row: auto; }
  .people { grid-template-columns: 1fr; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 14px 14px 0 0; max-height: 94vh; overflow-y: auto; }
  .status-actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Yazdırma ---------- */
@media print {
  :root { --paper: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --line: #bbb; }
  .side, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .table-wrap { border: 0; }
  .table th { background: none; }
  .report-table tfoot td { border-top: 2px solid #000; }
}
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.report-head h1 { font-size: 24px; margin: 4px 0; }
.report-table { background: var(--surface); }
.report-table tfoot td { padding: 10px 14px; font-weight: 600; }
.report-cats { margin-top: 24px; max-width: 480px; }
.report-cats h2 { font-size: 16px; margin-bottom: 8px; }
.report-foot { margin-top: 20px; font-size: 12px; }

/* Düzeltmeler: özgüllük sırası */
.topbar .menu-toggle { display: none; }
.search .global-search { border: 0; box-shadow: none; min-height: 0; padding: 0; background: none; }
.search-filter input[type=search] { border: 0; box-shadow: none; min-height: 0; padding: 0; }
@media (max-width: 900px) { .topbar .menu-toggle { display: inline-grid; } }
.cell-title .count-pill { align-self: flex-start; margin-left: 0; margin-top: 2px; }
@media (max-width: 640px) { .table td.hide-sm { display: none; } }

/* ---------- Nakit akışı ---------- */
:root { --flow-in: #0a7aa0; --flow-out: #d0622a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --flow-in: #2f97b8; --flow-out: #d9733d; } }
:root[data-theme="dark"] { --flow-in: #2f97b8; --flow-out: #d9733d; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.key-in { background: var(--flow-in); }
.key-out { background: var(--flow-out); }
.neg { color: var(--red); }
.cashflow .board-num.money-num { font-size: 26px; padding: 4px 0 6px; }
.cashflow .board-label { display: inline-flex; align-items: center; }
.cashflow .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.note-box { display: grid; gap: 4px; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius); background: var(--amber-soft); color: var(--ink); font-size: 14px; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.chart-wrap { position: relative; }
.flow-chart { width: 100%; height: auto; display: block; overflow: visible; }
.flow-chart .grid { stroke: var(--line); stroke-width: 1; }
.flow-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.flow-chart .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.flow-chart .hit { fill: transparent; }
.flow-chart .month.on .hit, .flow-chart .month:focus .hit { fill: var(--surface-2); }
.flow-chart .month:focus { outline: none; }
.flow-chart .bar-in { fill: var(--flow-in); }
.flow-chart .bar-out { fill: var(--flow-out); }
.chart-tip { position: absolute; top: 8px; z-index: 5; display: grid; gap: 3px; min-width: 210px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; pointer-events: none; }
.chart-tip[hidden] { display: none; }
.chart-tip span { display: flex; align-items: center; gap: 4px; color: var(--ink-2); }
.chart-tip b { margin-left: auto; color: var(--ink); padding-left: 12px; }
.chart-tip .tip-sep { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.breakdown { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bd-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.bd-row span { flex: 1; min-width: 0; }
.bd-row small { width: 36px; text-align: right; }
.bd-track { height: 8px; border-radius: 4px; background: var(--grey-soft); }
.bd-fill { height: 100%; border-radius: 4px; }
.bd-in { background: var(--flow-in); }
.bd-out { background: var(--flow-out); }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-list li { display: flex; align-items: center; gap: 4px; }
.acc-list li.off { opacity: .55; }
.acc { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; cursor: pointer; }
.acc:hover { border-color: var(--line-strong); background: var(--surface-2); }
.acc.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.acc-kind { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }
.acc strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-bal { grid-row: 2 / 4; grid-column: 2; align-self: center; font-size: 16px; }
.acc small { grid-column: 1; }
.ledger td { white-space: nowrap; }
.ledger td:nth-child(2) { white-space: normal; }
.ledger .pos { color: var(--green); font-weight: 600; }
@media (max-width: 1100px) { .cashflow .detail-grid, .grid-2.even { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cashflow .board-num.money-num { font-size: 20px; } .ledger td { white-space: normal; } }
.panel-head .btn-link { margin-top: 0; min-height: 0; }
@media (max-width: 640px) {
  .chart-wrap { overflow-x: auto; }
  .flow-chart { min-width: 600px; }
  .chart-tip { position: fixed; top: auto; bottom: 16px; left: 16px !important; right: 16px !important; }
}

/* ---------- Mürettebat evrakları ---------- */
.tabs a.tab { text-decoration: none; }
.cd-matrix th { white-space: nowrap; }
.cd-matrix td { white-space: nowrap; }
.cd-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.cd-cell i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink-3); }
.cd-valid i { background: var(--green); }
.cd-expiring i { background: var(--amber); }
.cd-expiring { color: var(--amber); font-weight: 600; }
.cd-expired i, .cd-missing i { background: var(--red); }
.cd-expired, .cd-missing { color: var(--red); font-weight: 600; }
.cd-none { color: var(--ink-3); }
.cd-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; margin: 0; }
.cd-legend div { display: flex; gap: 10px; font-size: 14px; }
.cd-legend dt { min-width: 52px; font-weight: 700; }
.cd-legend dd { margin: 0; color: var(--ink-2); }
.cd-person { display: inline-flex; align-items: center; gap: 12px; }
.cd-progress { display: grid; gap: 6px; max-width: 520px; margin: -6px 0 20px; }
.cd-fill { background: var(--green); }
.cd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cd-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); }
.cd-item.cd-expiring { border-left-color: var(--amber); }
.cd-item.cd-expired, .cd-item.cd-missing { border-left-color: var(--red); }
.cd-item.cd-none { border-left-color: var(--line-strong); }
.cd-item, .cd-item.cd-expiring, .cd-item.cd-expired, .cd-item.cd-missing { color: var(--ink); font-weight: 400; }
.cd-item-main { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.cd-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; }
.cd-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-history summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.cd-history ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.restore { margin-top: 18px; }
.restore .stack { margin-top: 10px; }
