/* D1 Maritime — Faz 6 — Modern UI System
   Aesthetic: Editorial × Operational maritime
*/
:root {
  --bg: #f5f1e8;
  --bg-shaded: #ede6d4;
  --surface: #ffffff;
  --surface-2: #faf6ec;
  --surface-3: #f0ebde;
  --sidebar: #0c1b2c;
  --sidebar-2: #142a3f;
  --sidebar-text: #cdd6e0;
  --sidebar-text-2: #8b95a3;
  --sidebar-text-3: #4d5d6e;
  --sidebar-active: rgba(45, 139, 128, 0.14);
  --text: #0c1b2c;
  --text-2: #4a5867;
  --text-3: #8b95a3;
  --text-inverse: #f5f1e8;
  --accent: #1f5f5b;
  --accent-2: #2d8b80;
  --accent-soft: #c9dcd8;
  --accent-bg: #e3eef0;
  --warn: #c97826;
  --warn-bg: #fbeed8;
  --warn-strong: #8a4f15;
  --danger: #b13a3a;
  --danger-bg: #fae3e3;
  --danger-strong: #7a2424;
  --success: #4a7a3e;
  --success-bg: #e6efde;
  --info: #4a6a8e;
  --info-bg: #e3ebf2;
  --border: rgba(12, 27, 44, 0.08);
  --border-2: rgba(12, 27, 44, 0.16);
  --border-3: rgba(12, 27, 44, 0.24);
  --shadow-xs: 0 1px 2px rgba(12, 27, 44, 0.04);
  --shadow-sm: 0 1px 3px rgba(12, 27, 44, 0.06), 0 1px 2px rgba(12, 27, 44, 0.04);
  --shadow-md: 0 4px 12px rgba(12, 27, 44, 0.06), 0 2px 4px rgba(12, 27, 44, 0.04);
  --shadow-lg: 0 16px 40px rgba(12, 27, 44, 0.10), 0 4px 12px rgba(12, 27, 44, 0.06);
  --shadow-xl: 0 32px 80px rgba(12, 27, 44, 0.16), 0 12px 24px rgba(12, 27, 44, 0.08);
  --r-xs: 3px; --r-sm: 5px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 999px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 280ms;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.10 0 0 0 0 0.17 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5; mix-blend-mode: multiply;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, select, textarea, button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-2); }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--r-full); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); background-clip: padding-box; border: 2px solid transparent; }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  background: var(--surface);
  border: 1px solid var(--border-2);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  font-size: 14px;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--border-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 80px; }

label {
  font-size: 12px; color: var(--text-2); display: block; margin-bottom: 6px;
  font-weight: 500; letter-spacing: 0.01em;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%234a5867' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--text); color: var(--bg);
  border: 1px solid var(--text);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; letter-spacing: 0.005em;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap; user-select: none;
}
.btn:hover:not(:disabled) { background: #1c2939; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-3); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-success { background: var(--success); border-color: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #3e6633; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #95302f; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: white; }
.btn-warn:hover:not(:disabled) { background: #a96420; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 20px; font-size: 14px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, #0a1626 100%);
  color: var(--sidebar-text);
  padding: 20px 0 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); }
.brand { padding: 0 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); margin-bottom: 12px; }
.brand-mark {
  font-family: var(--serif); font-size: 24px; font-weight: 500;
  letter-spacing: -0.015em; color: var(--text-inverse); margin: 0;
}
.brand-sub { font-size: 10px; color: var(--sidebar-text-3); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 4px; font-weight: 500; }

.nav-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sidebar-text-3); padding: 14px 22px 6px; font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px; color: var(--sidebar-text);
  cursor: pointer; font-size: 13.5px; font-weight: 400;
  border-left: 2px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.03); color: white; }
.nav-item.active { background: var(--sidebar-active); color: white; border-left-color: var(--accent-2); font-weight: 500; }
.nav-item.active::after { content: ''; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }
.nav-item .nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-item.disabled { color: var(--sidebar-text-3); cursor: not-allowed; opacity: 0.45; }
.nav-item.disabled:hover { background: transparent; color: var(--sidebar-text-3); }

.sidebar-footer { margin-top: auto; padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 11px; color: var(--sidebar-text-3); }
.user-block { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); margin-bottom: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(45, 139, 128, 0.3);
}
.user-block .user-info { min-width: 0; flex: 1; }
.user-block .user-name { color: var(--sidebar-text); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-block .user-role { font-size: 10.5px; color: var(--sidebar-text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 1px; }
.logout-btn { background: transparent; color: var(--sidebar-text-3); border: 1px solid rgba(255, 255, 255, 0.08); padding: 6px 12px; border-radius: var(--r-sm); font-size: 11px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-fast); }
.logout-btn:hover { color: white; border-color: rgba(255, 255, 255, 0.20); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.85);
}
.topbar .crumbs { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }
.topbar h1 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 2px 0 0; letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-2); }

.content { padding: 28px 32px 60px; max-width: 1320px; width: 100%; }

.mobile-toggle { display: none; background: var(--text); color: var(--bg); border: none; border-radius: var(--r-sm); padding: 8px; width: 36px; height: 36px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-xs); transition: box-shadow var(--t-base), border-color var(--t-base); }
.card:hover { box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-h h2 { font-family: var(--serif); font-size: 18px; font-weight: 500; margin: 0; letter-spacing: -0.01em; flex: 1; min-width: 0; }
.card-h .actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; position: relative; box-shadow: var(--shadow-xs); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base); overflow: hidden; }
.metric::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--accent); opacity: 0; transition: opacity var(--t-base); }
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric:hover::before { opacity: 1; }
.metric .label { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 8px; font-weight: 500; }
.metric .value { font-family: var(--serif); font-size: 30px; font-weight: 500; margin: 0; letter-spacing: -0.025em; line-height: 1.1; font-feature-settings: "tnum"; }
.metric .sub { font-size: 12px; color: var(--text-2); margin: 6px 0 0; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 500; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 12px; border-bottom: 1px solid var(--border-2); background: var(--surface-2); }
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr { transition: background var(--t-fast); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num, table.data .right { text-align: right; }
table.data .num { font-family: var(--mono); font-feature-settings: "tnum"; }
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.table-wrap table.data th { background: var(--surface-3); }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 9px; border-radius: var(--r-full); font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; line-height: 1.3; }
.tag-warn { background: var(--warn-bg); color: var(--warn-strong); }
.tag-danger { background: var(--danger-bg); color: var(--danger-strong); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-warning { background: var(--warn-bg); color: var(--warn-strong); }
.tag-accent { background: var(--accent-bg); color: var(--accent); }
.tag-neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.select-sm { padding: 6px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-family: inherit; cursor: pointer; }
.select-sm:focus { outline: none; border-color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: var(--r-full); font-size: 12px; font-family: var(--mono); color: var(--text); }

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.pbar { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; position: relative; }
.pbar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: var(--r-full); transition: width var(--t-slow) var(--ease-spring); position: relative; overflow: hidden; }
.pbar > div::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transform: translateX(-100%); animation: shimmer 2s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.pbar.warn > div { background: linear-gradient(90deg, var(--warn), #d4823a); }
.pbar.danger > div { background: linear-gradient(90deg, var(--danger), #c44747); }
.pbar.lg { height: 10px; }

.alert { padding: 12px 16px; border-radius: var(--r-md); font-size: 13px; margin-bottom: 8px; display: flex; align-items: flex-start; gap: 10px; border-left: 3px solid; background: var(--surface-2); }
.alert-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.alert-warn { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn-strong); }
.alert-danger { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger-strong); }
.alert-success { background: var(--success-bg); border-left-color: var(--success); color: var(--success); }
.alert-info { background: var(--info-bg); border-left-color: var(--info); color: var(--info); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.muted { color: var(--text-2); }
.muted-2 { color: var(--text-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.serif { font-family: var(--serif); }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.empty { text-align: center; color: var(--text-3); padding: 60px 24px; font-size: 14px; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: var(--r-lg); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.empty-title { font-family: var(--serif); color: var(--text); font-size: 17px; font-weight: 500; margin: 0 0 6px; }
.empty-desc { margin: 0 0 16px; max-width: 320px; margin-inline: auto; line-height: 1.5; }

@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.skeleton { display: block; background: var(--surface-2); border-radius: var(--r-sm); animation: skeleton-pulse 1.5s ease-in-out infinite; position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); animation: shimmer 1.5s infinite; }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line:last-child { margin-bottom: 0; width: 70%; }
.skeleton-card { padding: 20px; }
.skeleton-metric { height: 102px; border-radius: var(--r-lg); }

.spinner { width: 20px; height: 20px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.page { display: none; }
.page.active { display: block; animation: fadeUp 0.32s var(--ease-spring) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.metric { animation: fadeUp 0.4s var(--ease-spring) both; }
.metric:nth-child(1) { animation-delay: 0ms; }
.metric:nth-child(2) { animation-delay: 40ms; }
.metric:nth-child(3) { animation-delay: 80ms; }
.metric:nth-child(4) { animation-delay: 120ms; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: var(--r-md); font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px); transition: opacity var(--t-base), transform var(--t-base) var(--ease-spring); pointer-events: none; z-index: 1000; max-width: 360px; display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-error { background: var(--danger); }
.toast.toast-success { background: var(--success); }

.modal-overlay { position: fixed; inset: 0; background: rgba(12, 27, 44, 0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); max-width: 540px; width: 100%; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; animation: modalIn 0.32s var(--ease-spring) both; border: 1px solid var(--border); }
.modal.modal-lg { max-width: 720px; }
.modal.modal-xl { max-width: 920px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.modal-title { font-family: var(--serif); font-size: 19px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.modal-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.modal-close { background: transparent; border: none; padding: 6px; border-radius: var(--r-sm); color: var(--text-2); display: flex; cursor: pointer; transition: background var(--t-fast); }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); flex-shrink: 0; flex-wrap: wrap; }

.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-help { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 12px; border-radius: var(--r-sm); transition: background var(--t-fast); }
.check-row:hover { background: var(--surface-2); }
.check-row input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.check-row .check-label { font-size: 13px; }
.check-row .check-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.icon { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.6; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; padding-bottom: 0; }
.tab { padding: 10px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t-fast), border-color var(--t-fast); font-weight: 500; white-space: nowrap; background: transparent; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.vessel-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.vessel-pill-btn { padding: 7px 14px; font-size: 12.5px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-2); border-radius: var(--r-full); cursor: pointer; transition: all var(--t-fast); font-weight: 500; }
.vessel-pill-btn:hover { border-color: var(--text-2); color: var(--text); }
.vessel-pill-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.list li:last-child { border-bottom: none; }

@media (max-width: 1024px) {
  .row-3 { grid-template-columns: 1fr; }
  .row-4 { grid-template-columns: 1fr 1fr; }
  .content { padding: 22px 22px 60px; }
}
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; width: 280px; transform: translateX(-100%); transition: transform var(--t-base) var(--ease); z-index: 50; box-shadow: var(--shadow-xl); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(12, 27, 44, 0.5); z-index: 49; opacity: 0; pointer-events: none; transition: opacity var(--t-base); }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 12px 18px; gap: 12px; }
  .topbar h1 { font-size: 22px; }
  .topbar .crumbs { display: none; }
  .topbar-right { gap: 10px; }
  .topbar-date { display: none; }
  .content { padding: 18px 16px 80px; }
  .row-2, .row-4 { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .metric .value { font-size: 24px; }
  .card { padding: 18px 16px; }
  .modal { max-height: 92vh; }
  .modal-overlay { padding: 12px; }
  table.data { font-size: 12px; }
  table.data th, table.data td { padding: 8px; }
  /* Tablo overflow düzeltmesi - mobile'da yatay scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
  .table-wrap table { min-width: 480px; }
  /* WhatsApp FAB - sidebar açıkken üstte kalmasın */
  .sidebar.open ~ #wa-fab { display: none; }
  /* Form ve button mobile dostu */
  .btn { padding: 10px 14px; font-size: 13px; }
  input, select, textarea { font-size: 16px !important; /* iOS zoom önleme */ }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { padding: 14px 14px; }
  .metric .value { font-size: 22px; }
  .metric .label { font-size: 10px; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media print {
  .sidebar, .topbar, .actions, .btn { display: none !important; }
  .app { grid-template-columns: 1fr; }
  body::before { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
