/* ==========================================================================
   Şantiye101 — Tasarım Sistemi
   Modern, profesyonel "Construction ERP" arayüzü.
   Açık gri arka plan · beyaz kartlar · koyu metin · kontrollü turuncu vurgu.
   ========================================================================== */

:root {
    /* Yüzeyler & arka plan */
    --bg: #eceef1;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --surface-3: #f0f2f5;

    /* Sidebar (koyu) */
    --sidebar-bg: #1b2431;
    --sidebar-bg-2: #151c26;
    --sidebar-border: #2a3543;
    --sidebar-text: #9aa6b5;
    --sidebar-text-strong: #e8edf3;
    --sidebar-hover: #232f3e;
    --sidebar-active: #2b3a4d;

    /* Metin */
    --text: #1e2732;
    --text-muted: #66717f;
    --text-soft: #9aa4b1;

    /* Kenarlık */
    --border: #e3e7ec;
    --border-strong: #d2d8e0;

    /* Vurgu (turuncu) */
    --accent: #ea6a1e;
    --accent-dark: #c9560f;
    --accent-soft: #fdefe5;

    /* Durum renkleri */
    --green: #2f9e6f;   --green-soft: #e6f6ee;
    --blue: #2f74c0;    --blue-soft: #e8f1fb;
    --amber: #d9942a;   --amber-soft: #fdf3e2;
    --red: #d64545;     --red-soft: #fbeaea;
    --gray: #7a8593;    --gray-soft: #eceef1;
    --purple: #6b52c0;  --purple-soft: #eee9fb;
    --teal: #21867a;    --teal-soft: #e2f4f1;

    --radius: 10px;
    --radius-sm: 7px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --shadow: 0 2px 8px rgba(16,24,40,.07);
    --shadow-md: 0 4px 16px rgba(16,24,40,.10);
    --shadow-lg: 0 12px 34px rgba(16,24,40,.16);

    --sidebar-w: 252px;
    --navbar-h: 62px;
    --font: "Segoe UI", "Inter", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; color: var(--text); }

/* ==========================================================================
   Uygulama iskeleti
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; }

/* ------------------------------ Sidebar ---------------------------------- */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
    color: var(--sidebar-text);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 20px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-brand .logo {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 17px;
    box-shadow: 0 3px 8px rgba(234,106,30,.4);
    flex-shrink: 0;
}
.sidebar-brand .brand-text { line-height: 1.15; }
.sidebar-brand .brand-text b { color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .2px; display: block; }
.sidebar-brand .brand-text span { color: var(--sidebar-text); font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 24px;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #2c3949; border-radius: 8px; }

.nav-group { margin-top: 16px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #61707f;
    padding: 6px 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .13s, color .13s;
    position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-item.active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-item .nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .95; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
}
.nav-item .nav-badge.gray { background: #33404f; color: #aeb8c4; }

/* ------------------------------ Main ------------------------------------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ------------------------------ Navbar ----------------------------------- */
.navbar {
    height: var(--navbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 40;
}
.navbar .menu-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 38px; height: 38px; border-radius: 8px;
    color: var(--text-muted);
}
.navbar .menu-toggle:hover { background: var(--surface-3); }

/* Aktif şantiye seçici */
.site-switcher { display: flex; align-items: center; gap: 10px; }
.site-switcher .label { font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.site-select {
    display: flex; align-items: center; gap: 9px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 7px 12px;
    min-width: 210px;
    cursor: pointer;
}
.site-select .site-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); flex-shrink: 0; }
.site-select select {
    border: none; background: transparent; font-family: var(--font);
    font-weight: 650; font-size: 13.5px; color: var(--text); cursor: pointer;
    outline: none; width: 100%; appearance: none;
}
.site-select .chev { color: var(--text-soft); flex-shrink: 0; }

/* Global arama */
.global-search { flex: 1; max-width: 440px; position: relative; }
.global-search .search-box {
    display: flex; align-items: center; gap: 9px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 13px;
    transition: border-color .15s, box-shadow .15s;
}
.global-search .search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.global-search input {
    border: none; background: transparent; outline: none;
    font-family: var(--font); font-size: 13.5px; width: 100%; color: var(--text);
}
.global-search .search-ico { color: var(--text-soft); flex-shrink: 0; }
.global-search kbd {
    font-family: var(--font); font-size: 11px; color: var(--text-soft);
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 5px; padding: 1px 6px; flex-shrink: 0;
}
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border);
    border-radius: 11px; box-shadow: var(--shadow-lg);
    max-height: 420px; overflow-y: auto; z-index: 60; padding: 6px; display: none;
}
.search-results.show { display: block; }
.search-results .sr-empty { padding: 22px; text-align: center; color: var(--text-soft); font-size: 13px; }
.search-results .sr-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; cursor: pointer; }
.search-results .sr-item:hover { background: var(--surface-2); }
.search-results .sr-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; font-size: 13px; font-weight: 700; }
.search-results .sr-body { min-width: 0; }
.search-results .sr-title { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .sr-sub { font-size: 11.5px; color: var(--text-soft); }
.search-results .sr-cat { margin-left: auto; font-size: 10.5px; color: var(--text-soft); background: var(--surface-3); border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }

/* Navbar sağ */
.navbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
    position: relative;
    width: 40px; height: 40px; border-radius: 9px;
    border: 1px solid transparent; background: transparent;
    display: grid; place-items: center; cursor: pointer; color: var(--text-muted);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.icon-btn .dot-count {
    position: absolute; top: 5px; right: 6px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 20px; min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center; border: 2px solid #fff;
}
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 30px; cursor: pointer; }
.user-chip:hover { background: var(--surface-2); }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #3a4a5e, #263140); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-chip .u-name { font-size: 13px; font-weight: 650; line-height: 1.1; }
.user-chip .u-role { font-size: 11px; color: var(--text-soft); }

/* Dropdown (bildirim / kullanıcı) */
.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 360px; background: #fff; border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60;
    display: none; overflow: hidden;
}
.dropdown-panel.show { display: block; }
.dropdown-head { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dropdown-head b { font-size: 14px; }
.dropdown-head a { font-size: 12px; color: var(--accent); font-weight: 600; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--surface-3); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: #fdfaf7; }
.notif-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.notif-body { min-width: 0; }
.notif-msg { font-size: 13px; color: var(--text); line-height: 1.35; }
.notif-time { font-size: 11px; color: var(--text-soft); margin-top: 3px; }
.dropdown-foot { padding: 10px; text-align: center; border-top: 1px solid var(--border); }
.dropdown-foot a { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }

/* ------------------------------ İçerik ----------------------------------- */
.content { padding: 24px 26px 60px; max-width: 1560px; width: 100%; }

/* Sayfa başlığı */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .ph-title { display: flex; flex-direction: column; gap: 3px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.page-head .ph-sub { color: var(--text-muted); font-size: 13.5px; }
.page-head .ph-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

/* ==========================================================================
   Bileşenler
   ========================================================================== */

/* Kart */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-head .ch-sub { font-size: 12px; color: var(--text-soft); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.p0 { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); }
.card-link { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.card-link:hover { color: var(--accent-dark); }

/* Grid yardımcıları */
.grid { display: grid; gap: 18px; }
.grid-kpi { grid-template-columns: repeat(6, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.mt-18 { margin-top: 18px; } .mt-24 { margin-top: 24px; } .mb-18 { margin-bottom: 18px; }

/* KPI kartı */
.kpi {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 17px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
    position: relative; overflow: hidden;
}
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .kpi-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .kpi-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.kpi .kpi-value { font-size: 27px; font-weight: 750; letter-spacing: -.5px; line-height: 1; }
.kpi .kpi-value small { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.kpi .kpi-delta { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.kpi .kpi-delta.up { color: var(--green); } .kpi .kpi-delta.down { color: var(--red); } .kpi .kpi-delta.flat { color: var(--text-soft); }

/* Renk temaları (ikon arka planları) */
.tone-accent { background: var(--accent-soft); color: var(--accent); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-gray { background: var(--gray-soft); color: var(--gray); }
.tone-teal { background: var(--teal-soft); color: var(--teal); }

/* Progress bar */
.progress { height: 8px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.progress .bar { height: 100%; border-radius: 20px; background: var(--accent); transition: width .5s ease; }
.progress.tall { height: 10px; }
.bar.p-low { background: var(--red); }
.bar.p-mid { background: var(--amber); }
.bar.p-high { background: var(--blue); }
.bar.p-done { background: var(--green); }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-size: 12.5px; font-weight: 700; min-width: 38px; text-align: right; }

/* Blok ilerleme satırı (dashboard) */
.block-prog { padding: 13px 0; border-bottom: 1px solid var(--surface-3); }
.block-prog:last-child { border-bottom: none; }
.block-prog .bp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.block-prog .bp-name { font-weight: 650; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.block-prog .bp-badge { width: 26px; height: 26px; border-radius: 7px; background: var(--sidebar-bg); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.block-prog .bp-meta { font-size: 11.5px; color: var(--text-soft); }
.block-prog .bp-pct { font-weight: 750; font-size: 15px; }

/* Badge / etiket */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 20px; line-height: 1.4;
    white-space: nowrap;
}
.badge .bd { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: #1f7a54; }
.badge-blue { background: var(--blue-soft); color: #235a97; }
.badge-amber { background: var(--amber-soft); color: #a86f18; }
.badge-red { background: var(--red-soft); color: #b23434; }
.badge-gray { background: var(--gray-soft); color: #5f6b78; }
.badge-purple { background: var(--purple-soft); color: #543fa3; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge-teal { background: var(--teal-soft); color: #1a6a60; }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); }

/* Buton */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: var(--font); font-size: 13.5px; font-weight: 600;
    padding: 9px 15px; border-radius: 9px; cursor: pointer;
    border: 1px solid transparent; transition: background .13s, box-shadow .13s, border-color .13s;
    white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(234,106,30,.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-light:hover { background: var(--surface-2); border-color: var(--text-soft); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* Tablo */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th {
    text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-soft); padding: 11px 16px; border-bottom: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap; position: sticky; top: 0;
}
table.tbl thead th.sortable { cursor: pointer; user-select: none; }
table.tbl thead th.sortable:hover { color: var(--text); }
table.tbl thead th .sort-ind { opacity: .4; font-size: 10px; margin-left: 3px; }
table.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid var(--surface-3); color: var(--text); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .t-strong { font-weight: 650; }
table.tbl .t-muted { color: var(--text-muted); }
table.tbl .row-link { cursor: pointer; }
.cell-main { display: flex; align-items: center; gap: 11px; }
.cell-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 12px; }
.cell-sub { font-size: 11.5px; color: var(--text-soft); }

/* Toolbar (arama + filtre) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .tb-search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.toolbar .tb-search input {
    width: 100%; padding: 9px 13px 9px 36px; border: 1px solid var(--border); border-radius: 9px;
    font-family: var(--font); font-size: 13.5px; background: var(--surface); outline: none;
}
.toolbar .tb-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar .tb-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.select-field, .toolbar select {
    padding: 9px 13px; border: 1px solid var(--border); border-radius: 9px;
    font-family: var(--font); font-size: 13.5px; background: var(--surface); color: var(--text);
    outline: none; cursor: pointer;
}
.select-field:focus, .toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 6px 13px; border-radius: 7px; font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* Boş durum */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-soft); }
.empty-state .es-ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-soft); }
.empty-state h4 { color: var(--text-muted); font-size: 15px; margin-bottom: 5px; }

/* Liste / aktivite */
.activity-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--surface-3); }
.activity-item:last-child { border-bottom: none; }
.activity-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13.5px; font-weight: 600; }
.activity-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.activity-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-soft); }

/* Meta satır (detay) */
.meta-list { display: flex; flex-direction: column; }
.meta-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--surface-3); font-size: 13.5px; }
.meta-row:last-child { border-bottom: none; }
.meta-row .mk { color: var(--text-muted); }
.meta-row .mv { font-weight: 600; text-align: right; }

/* İstatistik mini kutu */
.stat-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-box .sb-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.stat-box .sb-value { font-size: 21px; font-weight: 750; margin-top: 4px; }

/* Sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 11px 15px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(20,28,38,.5);
    display: none; align-items: flex-start; justify-content: center;
    z-index: 100; padding: 40px 16px; overflow-y: auto; backdrop-filter: blur(2px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 620px;
    box-shadow: var(--shadow-lg); animation: modalIn .18s ease; margin: auto;
}
.modal.lg { max-width: 820px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16.5px; font-weight: 680; }
.modal-head .sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.modal-close { width: 34px; height: 34px; border-radius: 8px; border: none; background: var(--surface-2); cursor: pointer; color: var(--text-muted); display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Form */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.form-field label .req { color: var(--red); }
.form-field input, .form-field select, .form-field textarea {
    padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
    font-family: var(--font); font-size: 13.5px; background: #fff; color: var(--text); outline: none;
    width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-field textarea { resize: vertical; min-height: 72px; }
.form-hint { font-size: 11.5px; color: var(--text-soft); }
.form-file {
    border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 20px; text-align: center;
    color: var(--text-soft); font-size: 13px; cursor: pointer; background: var(--surface-2);
}
.form-file:hover { border-color: var(--accent); color: var(--accent); }

/* Alert / bilgi kutusu */
.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: 10px; font-size: 13px; align-items: flex-start; }
.alert-info { background: var(--blue-soft); color: #235a97; }
.alert-success { background: var(--green-soft); color: #1f7a54; }
.alert-warning { background: var(--amber-soft); color: #a86f18; }
.alert-danger { background: var(--red-soft); color: #b23434; }
.alert .a-ico { flex-shrink: 0; margin-top: 1px; }

/* Foto galeri */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-card { background: #fff; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.photo-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.photo-thumb { aspect-ratio: 4/3; display: grid; place-items: center; position: relative; color: #fff; }
.photo-thumb .pt-ico { opacity: .9; }
.photo-thumb .pt-wt { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.35); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; backdrop-filter: blur(3px); }
.photo-info { padding: 11px 13px; }
.photo-info .pi-cap { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.photo-info .pi-meta { font-size: 11px; color: var(--text-soft); margin-top: 5px; }

/* Takvim */
.calendar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-head div { padding: 10px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); padding: 7px; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other { background: var(--surface-2); }
.cal-cell.today .cal-daynum { background: var(--accent); color: #fff; }
.cal-daynum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 12.5px; font-weight: 650; margin-bottom: 5px; }
.cal-event { font-size: 11px; padding: 3px 7px; border-radius: 6px; margin-bottom: 3px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.tl-time { font-size: 11.5px; color: var(--text-soft); font-weight: 600; }
.tl-title { font-size: 13.5px; font-weight: 600; margin-top: 2px; }

/* Zaman çizelgesi (makine / operatör çalışma saatleri) */
.gantt-axis { display: flex; margin-left: 162px; font-size: 10.5px; color: var(--text-soft); margin-bottom: 6px; }
.gantt-axis span { flex: 1; text-align: left; }
.gantt-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--surface-3); }
.gantt-row:last-child { border-bottom: none; }
.gantt-label { width: 150px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.gantt-track { position: relative; flex: 1; height: 22px; background: var(--surface-3); border-radius: 6px; }
.gantt-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #fff; overflow: hidden; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.gantt-sub { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; opacity: .92; }

/* Yardımcılar */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.text-muted { color: var(--text-muted); } .text-soft { color: var(--text-soft); }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }
.text-right { text-align: right; } .text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
    .grid-kpi { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .grid-2, .grid-3, .col-span-2, .col-span-3 { grid-template-columns: 1fr; grid-column: auto; }
    .global-search { max-width: none; }
}
@media (max-width: 768px) {
    :root { --sidebar-w: 250px; }
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .navbar .menu-toggle { display: grid; }
    .site-switcher .label { display: none; }
    .global-search { display: none; }
    .grid-kpi { grid-template-columns: repeat(2, 1fr); }
    .user-chip .u-name, .user-chip .u-role { display: none; }
    .content { padding: 18px 16px 50px; }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; display: none; }
    .sidebar-backdrop.show { display: block; }
}
@media (max-width: 520px) {
    .grid-kpi { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; }
}

/* ==========================================================================
   Yazdırma (PDF çıktısı)
   ========================================================================== */
.print-only { display: none; }
@media print {
    .sidebar, .navbar, .sidebar-backdrop, .ph-actions, .no-print { display: none !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 0 !important; max-width: 100% !important; }
    body { background: #fff !important; font-size: 12px; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
    .print-only { display: block; }
    .grid { display: block; }
    .grid > * { margin-bottom: 12px; }
    table.tbl thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .badge, .kpi-ico, .cell-ico, .activity-ico { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { text-decoration: none; color: inherit; }
    @@page { margin: 1.2cm; }
}

/* ==========================================================================
   Public sayfalar (landing / login / register)
   ========================================================================== */
.public-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.public-nav { height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 20px; padding: 0 28px; position: sticky; top: 0; z-index: 40; }
.public-nav .brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 16px; }
.public-nav .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.public-nav .nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.public-nav .nav-links a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.public-nav .nav-links a:hover { background: var(--surface-2); color: var(--text); }
.public-main { flex: 1; }
.public-footer { background: var(--sidebar-bg); color: var(--sidebar-text); padding: 40px 28px 24px; }
.public-footer .pf-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.public-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.public-footer a { display: block; color: var(--sidebar-text); font-size: 13px; padding: 4px 0; }
.public-footer a:hover { color: #fff; }
.public-footer .pf-bottom { max-width: 1100px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--sidebar-border); font-size: 12px; color: #61707f; text-align: center; }

.hero { background: linear-gradient(160deg, #1b2431, #263140); color: #fff; padding: 72px 28px 80px; position: relative; overflow: hidden; }
.hero .hero-inner { max-width: 1000px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.hero .badge-pill { display: inline-block; background: rgba(234,106,30,.18); color: #ffb27a; border: 1px solid rgba(234,106,30,.35); padding: 6px 14px; border-radius: 30px; font-size: 12.5px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1.12; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { font-size: 18px; color: #aeb8c4; max-width: 680px; margin: 0 auto 30px; line-height: 1.6; }
.hero .hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.hero-stats .hs { text-align: center; }
.hero-stats .hs b { display: block; font-size: 30px; font-weight: 800; color: #fff; }
.hero-stats .hs span { font-size: 13px; color: #8894a2; }

.section { padding: 64px 28px; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 30px; font-weight: 750; letter-spacing: -.4px; margin-bottom: 10px; }
.section-title p { color: var(--text-muted); font-size: 15px; max-width: 560px; margin: 0 auto; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; transition: box-shadow .15s, transform .15s; }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-card .fc-ico { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; margin-bottom: 7px; }
.feature-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }

.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 20px; min-height: calc(100vh - 64px); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; padding: 36px; }
.auth-card .auth-logo { width: 52px; height: 52px; border-radius: 13px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px; margin: 0 auto 18px; }
.auth-card h1 { text-align: center; font-size: 22px; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }
.auth-card .form-field { margin-bottom: 15px; }
.auth-card label { display: block; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; font-size: 13px; }
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-muted); }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.checkbox-row input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

/* Doküman/legal sayfa */
.doc-page { max-width: 860px; margin: 0 auto; }
.doc-page h2 { font-size: 20px; margin: 28px 0 12px; padding-top: 10px; }
.doc-page h3 { font-size: 16px; margin: 20px 0 8px; }
.doc-page p, .doc-page li { color: var(--text-muted); line-height: 1.7; font-size: 14px; }
.doc-page ul { padding-left: 22px; margin: 8px 0; }
.doc-toc { position: sticky; top: 80px; }
.doc-toc a { display: block; padding: 5px 10px; border-radius: 6px; font-size: 13px; color: var(--text-muted); }
.doc-toc a:hover { background: var(--surface-2); color: var(--accent); }

.error-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.error-page .err-code { font-size: 96px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -3px; }
.error-page h1 { font-size: 24px; margin: 10px 0; }
.error-page p { color: var(--text-muted); max-width: 440px; margin-bottom: 24px; }

@media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
}

/* Yazdırma başlığı (rapor antetli) */
.print-header { display: none; }
@media print {
    .print-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: 18px; }
    .print-header .logo { width: 40px; height: 40px; background: var(--accent); color: #fff; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
}
