/* ==========================================================
   MCI Servis Yönetimi
   ========================================================== */
:root {
    --navy-950: #081428; --navy-900: #0C1A33; --navy-800: #13284B; --navy-700: #1B3763;
    --blue: #1F5FAE; --blue-600: #2A6CC0; --blue-dark: #174A8A; --blue-soft: #EAF1FA; --blue-line: #C9DAF0;
    --ink: #13284B; --text: #1D2635; --muted: #5F6B7D; --faint: #8A95A6;
    --line: #E2E7EF; --line-2: #EEF1F6; --bg: #F4F6FA; --card: #FFFFFF;
    --green: #157A4B; --green-soft: #E7F6EE; --amber: #9A5B0B; --amber-soft: #FDF3E1;
    --red: #C53030; --red-soft: #FDEDED;
    --r: 12px; --r-sm: 8px; --r-xs: 6px;
    --sh-1: 0 1px 2px rgba(19,40,75,.05);
    --sh-2: 0 6px 20px rgba(19,40,75,.07);
    --sh-3: 0 16px 40px rgba(8,20,40,.14);
    --f-head: 'Barlow', 'Segoe UI', Arial, sans-serif;
    --f-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    --nav-h: 68px; --tab-h: 66px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .88rem; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .01em; }
.eyebrow { display: block; font-family: var(--f-head); font-weight: 600; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }

/* ---------- Üst menü ---------- */
.topnav { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.topnav-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; } .brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--f-head); font-weight: 700; font-size: 1.2rem; letter-spacing: .04em; }
.brand-text small { font-size: .74rem; color: var(--muted); }
.topnav-links { display: flex; gap: 4px; flex: 1; }
.topnav-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-family: var(--f-head); font-weight: 500; font-size: .98rem; transition: background .15s, color .15s; }
.topnav-links a i { color: var(--faint); font-size: .92rem; }
.topnav-links a:hover { background: var(--line-2); }
.topnav-links a.active { background: var(--blue-soft); color: var(--blue-dark); }
.topnav-links a.active i { color: var(--blue); }
.user-menu { position: relative; margin-left: auto; }
.user-btn { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; color: var(--ink); }
.user-btn:hover { border-color: var(--blue-line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: .85rem; }
.user-name { display: flex; flex-direction: column; text-align: left; line-height: 1.15; font-weight: 600; font-size: .92rem; }
.user-name small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.user-btn > i { color: var(--faint); font-size: .7rem; }
.user-drop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-3); min-width: 220px; padding: 6px; z-index: 70; }
.user-drop a, .user-drop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-xs); color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.user-drop a:hover, .user-drop button:hover { background: var(--line-2); }
.user-drop i { color: var(--faint); width: 16px; }
.user-drop form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* ---------- Sayfa ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; }
.page.narrow { max-width: 920px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: 12px; color: var(--muted); }
.back:hover { color: var(--blue); }
.foot { text-align: center; font-size: .8rem; color: var(--faint); padding: 0 0 28px; }

/* ---------- Kart ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--sh-1); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; font-size: .86rem; color: var(--muted); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 18px 22px 0; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card + .card, .stack > .card + .card { margin-top: 0; }
.stack { display: grid; gap: 16px; align-content: start; }

/* ---------- Karşılama ---------- */
.hello { position: relative; overflow: hidden; border-radius: var(--r); padding: 28px 30px; color: #D3DDEC; background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--blue-dark) 100%); display: flex; justify-content: space-between; align-items: center; gap: 20px; box-shadow: var(--sh-2); }
.hello::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 36px solid rgba(255,255,255,.05); }
.hello .eyebrow { color: #9CC0EE; }
.hello h1 { color: #fff; margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.hello p { margin: 0; max-width: 560px; }
.hello-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- İstatistik ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--blue-line); box-shadow: var(--sh-2); }
.stat-ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: 0 0 auto; }
.stat-ico.amber { background: var(--amber-soft); color: var(--amber); }
.stat-ico.green { background: var(--green-soft); color: var(--green); }
.stat b { display: block; font-family: var(--f-head); font-size: 1.6rem; font-weight: 600; color: var(--ink); line-height: 1.05; }
.stat span { font-size: .86rem; color: var(--muted); }

/* ---------- Liste satırları ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.rows .row:first-child { border-top: 0; }
.row:hover { background: #FAFBFD; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row-title:hover { color: var(--blue); }
.row-sub { font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.row-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.empty { padding: 36px 22px; text-align: center; color: var(--muted); }
.empty i { display: block; font-size: 1.8rem; color: var(--faint); margin-bottom: 8px; }
.card .rows { margin: 0 -22px -22px; }
.card.flush .rows { margin: 0; }

.c-avatar { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--blue-soft); color: var(--blue-dark); display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: .9rem; flex: 0 0 auto; overflow: hidden; }
.c-avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.c-avatar.lg { width: 72px; height: 72px; font-size: 1.3rem; border-radius: 14px; }

/* ---------- Rozet ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue-dark); }
.b-green { background: var(--green-soft); color: var(--green); }
.b-gray { background: var(--line-2); color: var(--muted); }
.b-red { background: var(--red-soft); color: var(--red); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.chip i { color: var(--faint); }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; min-height: 42px; border-radius: var(--r-sm); border: 1px solid transparent; font-family: var(--f-head); font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; line-height: 1.1; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-dark); }
.btn-dark { background: var(--navy-800); color: #fff; } .btn-dark:hover { background: var(--navy-900); }
.btn-success { background: var(--green); color: #fff; } .btn-success:hover { background: #0F6039; }
.btn-light { background: #fff; color: var(--navy-900); } .btn-light:hover { background: var(--blue-soft); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.35); } .btn-ghost-light:hover { background: rgba(255,255,255,.08); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); } .btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fff; border-color: #F2C4C4; color: var(--red); } .btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .88rem; }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; }
.link { background: none; border: 0; color: var(--blue); font: inherit; font-size: .86rem; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.link.danger { color: var(--red); }

/* ---------- Formlar ---------- */
.form-section { margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 600; font-size: 1rem; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-title i { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: .85rem; }
.section-title small { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-weight: 400; color: var(--muted); font-size: .84rem; }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.fields.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fields .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--muted); }
.req::after { content: ' *'; color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #CED6E2; border-radius: var(--r-sm); background: #fff;
    font: inherit; font-size: 16px; color: var(--text); transition: border-color .15s, box-shadow .15s; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235F6B7D' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,95,174,.15); }
input[readonly] { background: var(--line-2); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-size: .94rem; background: #fff; transition: all .15s; user-select: none; }
.check-pill span::before { content: ''; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #B7C2D2; flex: 0 0 auto; transition: all .15s; }
.check-pill input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.check-pill input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--blue); }
.check-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31,95,174,.2); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .94rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin-top: 2px; flex: 0 0 auto; }
.form-actions { position: sticky; bottom: 0; z-index: 30; background: rgba(244,246,250,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); margin: 20px -20px -48px; padding: 14px 20px calc(14px + var(--safe-b)); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.form-actions .grow { margin-right: auto; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.save-state i { color: var(--green); }

/* Malzeme tablosu */
.mat-table { width: 100%; border-collapse: collapse; }
.mat-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 0 8px 8px; font-weight: 600; }
.mat-table td { padding: 4px; vertical-align: middle; }
.mat-table td:first-child { width: 55%; }
.mat-table td:nth-child(2) { width: 16%; }
.mat-table td:nth-child(3) { width: 20%; }
.mat-table td:last-child { width: 44px; text-align: center; }

/* İmza */
.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sig-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #FBFCFE; display: grid; gap: 12px; }
.sig-card h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.sig-card h3 i { color: var(--blue); }
.sig-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: 6px; }
.sig-box { position: relative; height: 170px; border: 1.5px dashed #B9C6D8; border-radius: var(--r-sm); background: #fff; touch-action: none; }
.sig-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; border-radius: var(--r-sm); }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: .88rem; pointer-events: none; text-align: center; padding: 0 12px; }
.sig.has-ink .sig-hint { display: none; }
.sig.has-ink .sig-box { border-style: solid; border-color: var(--blue-line); }

/* Fotoğraflar */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo { position: relative; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--line-2); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .photo-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: .76rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.photo .photo-del { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--red); cursor: pointer; display: grid; place-items: center; }
.photo .photo-del:hover { background: #fff; }
.photo-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed #B9C6D8; border-radius: var(--r-sm); aspect-ratio: 4 / 3; color: var(--muted); cursor: pointer; font-size: .88rem; text-align: center; background: #fff; padding: 10px; transition: border-color .15s, background .15s; }
.photo-drop:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.photo-drop i { font-size: 1.4rem; color: var(--blue); }
.photo-drop input { display: none; }
.photo.pending { outline: 2px solid var(--blue); }
.photo.pending::after { content: 'Kaydedilince yüklenecek'; position: absolute; top: 6px; left: 6px; font-size: .68rem; background: var(--blue); color: #fff; padding: 2px 6px; border-radius: 4px; }

/* Bakım kontrol listesi */
.checklist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cl-group { background: var(--line-2); padding: 9px 16px; font-family: var(--f-head); font-weight: 600; color: var(--ink); font-size: .92rem; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.cl-group:first-child { border-top: 0; }
.cl-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line-2); align-items: center; }
.cl-text { font-size: .95rem; }
.cl-text small { display: inline-block; margin-left: 6px; font-size: .74rem; color: var(--muted); background: var(--line-2); padding: 1px 7px; border-radius: 999px; }
.cl-opts { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.cl-opts label { position: relative; }
.cl-opts input { position: absolute; opacity: 0; }
.cl-opts span { display: block; padding: 7px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; color: var(--muted); background: #fff; border-left: 1px solid var(--line); user-select: none; }
.cl-opts label:first-child span { border-left: 0; }
.cl-opts input:checked + span.ok { background: var(--green); color: #fff; }
.cl-opts input:checked + span.no { background: var(--red); color: #fff; }
.cl-opts input:checked + span.na { background: #6B7789; color: #fff; }
.cl-opts input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--blue); }
.cl-note { grid-column: 1 / -1; }
.cl-note input { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.cl-progress { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--muted); }
.cl-bar { flex: 1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }

/* Arama / filtre */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar .search input { padding-left: 38px; }
.toolbar select { width: auto; min-width: 170px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 3px; }
.seg a { padding: 7px 12px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.pager a, .pager .disabled { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; background: #fff; }
.pager .disabled { color: var(--faint); background: var(--line-2); }
.pager-info { font-size: .88rem; color: var(--muted); }

/* Uyarılar */
.toast, .alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: .95rem; }
.toast i, .alert i { margin-top: 3px; }
.toast-ok { background: var(--green-soft); color: #0F5C38; border: 1px solid #BFE5D0; }
.toast-err, .alert-err { background: var(--red-soft); color: #922B2B; border: 1px solid #F3C6C6; }
.alert-info { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid var(--blue-line); }
.alert-warn { background: var(--amber-soft); color: #7A4708; border: 1px solid #F1D9A9; }

/* ---------- Belge (önizleme / PDF) ---------- */
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 16px; }
.doc-wrap { overflow-x: auto; padding-bottom: 6px; }
.doc { width: 794px; margin: 0 auto; background: #fff; color: #1B2433; padding: 44px 48px 36px; box-shadow: var(--sh-2); border-radius: 4px; font-size: 12.5px; line-height: 1.45; font-family: var(--f-body); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; border-bottom: 2.5px solid var(--navy-800); margin-bottom: 18px; }
.doc-brand { display: flex; align-items: center; gap: 12px; }
.doc-brand svg { width: 46px; height: 46px; }
.doc-brand strong { display: block; font-family: var(--f-head); font-size: 22px; letter-spacing: .06em; color: var(--navy-800); line-height: 1; }
.doc-brand small { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.doc-title { text-align: right; }
.doc-title h2 { font-size: 22px; margin: 0 0 4px; }
.doc-title .mono { font-size: 13px; color: var(--muted); }
.doc-sec { margin-bottom: 14px; }
.doc-sec h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; padding: 6px 10px; background: #EEF3FA; border-left: 3px solid var(--navy-800); color: var(--navy-800); }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; padding: 0 4px; }
.doc-grid .full { grid-column: 1 / -1; }
.doc-f dt { font-size: 10.5px; font-weight: 700; color: #4A5568; margin: 0; }
.doc-f dd { margin: 1px 0 0; font-size: 12.5px; color: #111827; white-space: pre-line; word-break: break-word; }
.doc-text { padding: 2px 4px; white-space: pre-line; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.doc-table th, .doc-table td { border: 1px solid #9AA5B4; padding: 4px 6px; text-align: left; vertical-align: top; }
.doc-table th { background: #DDE3EC; font-weight: 700; text-align: center; font-size: 10.5px; text-transform: uppercase; }
.doc-table .c { text-align: center; white-space: nowrap; }
.doc-table .grp { background: #F1F4F8; font-weight: 700; }
.res-ok { color: #0F6039; font-weight: 700; } .res-no { color: var(--red); font-weight: 700; } .res-na { color: #6B7789; }
.doc-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc-sig { border: 1px solid #C3CBD6; border-radius: 4px; padding: 10px 12px; min-height: 140px; }
.doc-sig dt { font-size: 10.5px; font-weight: 700; color: #4A5568; }
.doc-sig dd { margin: 0 0 6px; }
.doc-sig img { max-height: 80px; max-width: 100%; display: block; }
.doc-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #D5DBE3; font-size: 10px; color: #6B7280; text-align: center; }
.doc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-photos figure { margin: 0; border: 1px solid #D5DBE3; }
.doc-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.doc-photos figcaption { font-size: 10px; padding: 3px 5px; color: #4A5568; }
.gen-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(8,20,40,.55); display: grid; place-items: center; }
.gen-box { background: #fff; border-radius: var(--r); padding: 26px 30px; text-align: center; box-shadow: var(--sh-3); max-width: 320px; }
.gen-box i { font-size: 1.8rem; color: var(--blue); margin-bottom: 10px; }

/* ---------- Giriş ---------- */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--r); padding: 30px; box-shadow: var(--sh-2); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 4px; }
.auth-card form { display: grid; gap: 16px; margin-top: 20px; }

/* ---------- Yetkiler ---------- */
.perm-list { display: grid; gap: 8px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: #fff; }
.perm:has(input:checked) { border-color: var(--blue-line); background: var(--blue-soft); }
.perm:has(input:disabled) { cursor: default; opacity: .85; }
.perm input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: 0 0 auto; }
.perm b { display: block; font-size: .92rem; color: var(--ink); }
.perm small { display: block; font-size: .8rem; color: var(--muted); }
.role-help { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .9rem; color: var(--muted); }
.role-help .badge { margin-right: 6px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Seçim kartları (yeni kayıt) ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pick { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pick:hover { border-color: var(--blue); box-shadow: var(--sh-2); transform: translateY(-1px); }
.pick > i { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 auto; }
.pick b { display: block; color: var(--ink); font-family: var(--f-head); font-weight: 600; font-size: 1.02rem; }
.pick span { font-size: .86rem; color: var(--muted); }

/* ---------- Alt menü (mobil) ---------- */
.tabbar { display: none; }

/* ==========================================================
   Duyarlı
   ========================================================== */
@media (max-width: 1080px) {
    .topnav-links a { padding: 9px 10px; }
    .topnav-links a i { display: none; }
}
@media (max-width: 960px) {
    .grid-2 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .fields.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .topnav-links { display: none; }
    .user-name, .user-btn > i { display: none; }
    .user-btn { padding: 3px; }
    body.has-nav { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(19,40,75,.06); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
    .tabbar a i { font-size: 1.15rem; }
    .tabbar a.active { color: var(--blue); }
    .tabbar .tab-new { position: relative; }
    .tabbar .tab-new i { width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 8px 20px rgba(31,95,174,.4); transform: translateY(-14px); border: 4px solid #fff; }
    .form-actions { bottom: calc(var(--tab-h) + var(--safe-b)); margin-bottom: -48px; padding-bottom: 14px; }
    .foot { display: none; }
}
@media (max-width: 640px) {
    .page { padding: 16px 14px 40px; }
    .topnav-inner { padding: 0 14px; }
    .card { padding: 18px 16px; }
    .card .rows { margin: 0 -16px -18px; }
    .row { padding: 13px 16px; flex-wrap: wrap; }
    .row-actions { width: 100%; padding-left: 56px; }
    .row-actions .btn { flex: 1; }
    .card.flush .card-head { padding: 16px 16px 0; }
    .toolbar { padding: 14px 16px; }
    .pager { padding: 12px 16px; }
    .fields, .fields.cols-3, .sigs, .doc-sigs-edit { grid-template-columns: 1fr; }
    .fields .field[style*="span"] { grid-column: auto !important; }
    .section-title { flex-wrap: wrap; }
    .section-title small { margin-left: 40px; width: 100%; }
    .hello { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
    .hello-actions { width: 100%; }
    .hello-actions .btn { flex: 1; }
    .stats { gap: 10px; }
    .stat { padding: 13px 14px; gap: 10px; }
    .stat-ico { width: 36px; height: 36px; }
    .stat b { font-size: 1.35rem; }
    .form-actions { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
    .form-actions .btn { flex: 1; }
    .form-actions .grow { width: 100%; }
    .page-head .actions { width: 100%; }
    .page-head .actions .btn { flex: 1; }
    .doc-actions .btn { flex: 1 1 calc(50% - 8px); }
    .cl-item { grid-template-columns: 1fr; }
    .cl-opts { width: 100%; } .cl-opts label { flex: 1; } .cl-opts span { text-align: center; }
    .mat-table th:nth-child(3), .mat-table td:nth-child(3) { width: 26%; }
    .toolbar select, .seg { width: 100%; }
    .seg a { flex: 1; text-align: center; }
}

@media print {
    .topnav, .tabbar, .foot, .doc-actions, .no-print, .toast, .alert { display: none !important; }
    body { background: #fff; padding: 0; }
    .page { padding: 0; max-width: none; }
    .doc { box-shadow: none; width: auto; min-height: 0; padding: 0; }
    .doc-wrap { overflow: visible; }
}
