/* ============================================================
   Proje Yönetim Portalı — Ana Stil Dosyası
   ============================================================ */

/* ---------- CSS Değişkenleri ---------- */
:root {
    --primary:      #1E3A5F;
    --primary-dark: #0B1929;
    --secondary:    #2C7BE5;
    --success:      #00D97E;
    --warning:      #F6C343;
    --danger:       #E63757;
    --info:         #39AED4;
    /* M13 Sprint 4C SYS-04: AA-uyumlu metin tokenleri (beyaz arkaplanda 4.5:1+).
       Üstteki renkler (--success/warning/danger) küçük metinde AA fail (1.9:1/3.8:1).
       .text-success/.text-warning/.text-danger artık bu dark token'lara geçti.
       Solid renkler badge/progress bar gibi non-text kullanımlarda korundu. */
    --success-text: #047857;  /* dark green  — 7.3:1 on white */
    --warning-text: #92400E;  /* dark amber  — 7.5:1 on white */
    --danger-text:  #991B1B;  /* dark red    — 7.4:1 on white */
    --bg:           #F9FBFD;
    --white:        #FFFFFF;
    --text:         #1B2A3B;
    /* M20 Sprint 9 PR-3 (S9-C2 / A11Y-P0-12): #6C757D normal metinde 4.41:1
       — borderline AA fail (özellikle 12px). #5C636A → 5.05:1 on white,
       AA pass + 14px AA Large da güvenli. */
    --text-muted:   #5C636A;
    /* M03 Sprint 2B U-28: text-secondary AA-uyumlu gri (6B7280 → 4.69:1 on white)
       Daha önce tanımsızdı, view'lar var(--text-secondary) kullanıyordu. */
    --text-secondary: #6B7280;
    --border:       #E2E8F0;
    --sidebar-w:    260px;
    --header-h:     60px;
    --radius-sm:    4px;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --font-heading: 'Nunito Sans', sans-serif;
    --font-body:    'Inter', sans-serif;
    --transition:   0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: var(--secondary); }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ---------- Layout: Auth ---------- */
.auth-body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ---------- Layout: App ---------- */
.app-body { background: var(--bg); }

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform var(--transition);
}
.sidebar.mini { width: 72px !important; overflow: hidden; }
.sidebar.mini .nav-group-toggle .d-flex { justify-content: center; }
.sidebar.mini .nav-group-icon { margin: 0 auto; }

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }
.sidebar-scroll:hover::-webkit-scrollbar-thumb { background: #CBD5E1; }

/* Toggle button */
.sidebar-toggle-btn {
    position: absolute;
    right: -14px;
    top: 26px;
    z-index: 1001;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: all 0.2s ease;
    color: var(--text-muted);
    padding: 0;
}
.sidebar-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--bg);
    color: var(--text);
}
.sidebar-toggle-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}
.sidebar.mini .sidebar-toggle-btn svg { transform: rotate(180deg); }

.sidebar-brand-wrapper {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.sidebar-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--primary); text-decoration: none; white-space: nowrap; }
.sidebar-brand:hover { text-decoration: none; color: var(--primary); }

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.2);
}
.brand-icon svg { width: 1.2rem; height: 1.2rem; }
.sidebar-brand-text { display: flex; flex-direction: column; transition: opacity 0.2s ease; }
.brand-title { font-weight: 700; font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
.brand-subtitle { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.sidebar.mini .sidebar-brand-text { opacity: 0; width: 0; overflow: hidden; }

.sidebar-nav-wrapper {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Separator line between nav sections */
.nav-separator { height: 1px; background: rgba(226, 232, 240, 0.6); margin: 0.5rem 0.75rem; }

.nav-group { margin-bottom: 0.25rem; }
.nav-group-label {
    padding: 0 1.25rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    margin: 1px 0.5rem;
    border-radius: 8px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: #F1F5F9;
    color: var(--text);
    transform: translateX(3px);
    text-decoration: none;
}
.nav-item.active {
    background: #EEF2FF;
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--secondary);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    transition: color 0.2s ease;
}
.nav-item:hover .nav-icon { color: var(--text); }
.nav-item.active .nav-icon { color: var(--secondary); }
.nav-label { font-size: 0.85rem; font-weight: 500; transition: opacity 0.2s ease; }
.sidebar.mini .nav-label { opacity: 0; width: 0; overflow: hidden; }
/* Sprint 16 (A11Y-P2-44): WCAG 2.5.5 touch target ≥44px — mini mode'da label gizli, ikon küçük; min-height ile dokunmatik hedef korunur */
.sidebar.mini .nav-item { justify-content: center; padding: 0.6rem; margin: 1px 0.4rem; min-height: 44px; }

/* Sub-items within expanded group */
.nav-group-items .nav-item {
    padding-left: 2.75rem;
    font-size: 0.82rem;
}
.sidebar.mini .nav-group-items { display: none; }


.user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #F1F5F9;
    color: #475569;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-role { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ---------- Header ---------- */
.app-header {
    height: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.header-right { display: flex; align-items: center; gap: 1rem; }

.hamburger {
    background: none;
    border: none;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item:hover { color: var(--secondary); }
.breadcrumb-current { color: var(--text); font-weight: 500; }
.breadcrumb-sep { color: var(--border); }

/* Header User */
.header-user-wrapper {
    position: relative;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
}
.header-user:hover {
    background: #F1F5F9;
    border-color: var(--border);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; overflow: hidden; }
.user-fullname { font-size: 0.85rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-company { font-size: 0.75rem; color: var(--text-muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Header User Dropdown */
.header-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 200;
    overflow: hidden;
}

.header-user-dropdown-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.header-user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.header-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    font-family: inherit;
}
.header-user-dropdown-item:hover {
    background: #F1F5F9;
}

.header-user-dropdown-logout {
    color: var(--danger);
}
.header-user-dropdown-logout:hover {
    background: #FEF2F2;
}

/* Dropdown transitions */
.dropdown-enter { transition: all 0.15s ease-out; }
.dropdown-enter-start { opacity: 0; transform: translateY(-4px); }
.dropdown-enter-end { opacity: 1; transform: translateY(0); }
.dropdown-leave { transition: all 0.1s ease-in; }
.dropdown-leave-start { opacity: 1; transform: translateY(0); }
.dropdown-leave-end { opacity: 0; transform: translateY(-4px); }

/* ---------- Project Selector ---------- */
.project-selector {
    position: relative;
}
.project-selector-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: #EEF2FF;
    border: 1px solid #D4DEFF;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    font-family: inherit;
    transition: all var(--transition);
    max-width: 220px;
}
.project-selector-trigger:hover {
    background: #E0E7FF;
    border-color: var(--secondary);
}
.project-selector-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-selector-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    width: 280px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 200;
    overflow: hidden;
}
.project-selector-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.project-selector-list {
    max-height: 240px;
    overflow-y: auto;
}
.project-selector-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--transition);
}
.project-selector-item:hover {
    background: #F1F5F9;
}
.project-selector-item-active {
    background: #EEF2FF;
    color: var(--secondary);
    font-weight: 600;
}
.project-selector-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.project-selector-footer {
    border-top: 1px solid var(--border);
    padding: 0.35rem 0.5rem;
}
.project-selector-clear {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: none;
    border: none;
    font-size: 0.78rem;
    color: var(--danger);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: background var(--transition);
}
.project-selector-clear:hover {
    background: #FEF2F2;
}

@media (max-width: 768px) {
    .project-selector-trigger .project-selector-label { display: none; }
    .project-selector-trigger { padding: 0.35rem; }
    .project-selector-dropdown { right: -60px; width: 260px; }
}

/* ---------- Module Hub Cards ---------- */
.hub-card {
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}
.hub-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.hub-card .card-body {
    padding: 1.25rem;
}
.hub-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #EEF2FF;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hub-card-icon i,
.hub-card-icon svg {
    width: 24px;
    height: 24px;
}
.hub-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text);
    margin-bottom: 0.15rem;
}
.hub-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ---------- Page Content ---------- */
.page-content {
    padding: 1.5rem;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ---------- Flash Mesajları ---------- */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.flash-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--success); }
.flash-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.flash-warning { background: #FEF3C7; color: #92400E; border-left: 4px solid var(--warning); }
.flash-info    { background: #DBEAFE; color: #1E40AF; border-left: 4px solid var(--info); }

.flash-icon { flex-shrink: 0; }
.flash-text { flex: 1; }

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.5;
    padding: 0 0.25rem;
    color: inherit;
}

.flash-close:hover { opacity: 1; }

/* ---------- Alert (form validation) ---------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}
.alert-danger  { background: #FEE2E2; color: #991B1B; border-left-color: var(--danger); }
.alert-success { background: #D1FAE5; color: #065F46; border-left-color: var(--success); }
.alert-warning { background: #FEF3C7; color: #92400E; border-left-color: var(--warning); }
.alert-info    { background: #DBEAFE; color: #1E40AF; border-left-color: var(--info); }

/* ---------- Kart ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.card-body { padding: 1.25rem; }

/* ---------- İstatistik Kartları ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon { font-size: 2rem; }

/* ---------- Status Bar (segmentli durum özeti) ---------- */
.status-bar-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
}
.status-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.status-bar-total {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-right: 0.5rem;
}
.status-bar-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.status-bar-alerts {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.status-bar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}
.status-bar-pill.is-danger {
    background: rgba(230, 55, 87, 0.1);
    color: #C62849;
    border: 1px solid rgba(230, 55, 87, 0.28);
}
.status-bar-pill.is-warning {
    background: rgba(246, 195, 67, 0.15);
    color: #9A7509;
    border: 1px solid rgba(246, 195, 67, 0.4);
}
.status-bar-pill.is-info {
    background: rgba(44, 123, 229, 0.1);
    color: #1C5AA8;
    border: 1px solid rgba(44, 123, 229, 0.28);
}
.status-bar {
    display: flex;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #EEF2F6;
    margin-bottom: 0.85rem;
}
.status-bar-seg {
    min-width: 3px;
    transition: filter .2s;
}
.status-bar-seg:hover { filter: brightness(0.92); }
.status-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem 1.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}
.status-bar-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
}
.status-bar-legend strong {
    color: var(--text);
    font-weight: 700;
}
.status-bar-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    flex: 0 0 auto;
}

.stat-info { display: flex; flex-direction: column; }

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.stat-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ---------- Sprint 4 G-1: Portföy Kokpiti ---------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.portfolio-card { margin: 0; }
.portfolio-card-title {
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
}
.portfolio-card-title:hover { text-decoration: underline; }
.portfolio-card-meta { display: block; margin-bottom: 0.5rem; }

.portfolio-score-wrap { display: flex; align-items: center; gap: 0.75rem; }
.portfolio-score-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    min-width: 60px;
    text-align: center;
}
.portfolio-score-bar {
    flex: 1;
    height: 8px;
    background: #E9ECEF;
    border-radius: 4px;
    overflow: hidden;
    min-width: 80px;
}
.portfolio-score-fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.portfolio-score-good    { color: var(--success); }
.portfolio-score-warning { color: var(--warning); }
.portfolio-score-critical{ color: var(--danger); }
.portfolio-score-na      { color: var(--text-muted); }
.portfolio-score-fill.portfolio-score-good    { background: var(--success); }
.portfolio-score-fill.portfolio-score-warning { background: var(--warning); }
.portfolio-score-fill.portfolio-score-critical{ background: var(--danger); }
.portfolio-score-fill.portfolio-score-na      { background: #ADB5BD; }

.portfolio-signals {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #E9ECEF;
}
.portfolio-signal {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}
.portfolio-signal .badge { min-width: 100px; text-align: center; }

.portfolio-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid #E9ECEF;
}
.portfolio-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.badge-late-gap { margin-left: .25rem; }

/* ---------- Form Elemanları ---------- */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

/* Site-Wide Review S8-B (A11Y-P1-25): WCAG 1.4.11 UI component contrast 3:1.
   --border (#E2E8F0) form input border'ı 1.4:1 yetersiz; form input için
   daha koyu #CBD5E1 (3.4:1 contrast) kullan. Diğer kart kenarlıkları
   --border ile devam eder (görsel etki minimum). */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid #CBD5E1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(44,123,229,.15);
}

.input-wrapper { position: relative; }

.input-toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0.25rem;
}

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}
.btn-primary:hover { background: #1a6ad1; color: white; text-decoration: none; }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #c92a44; color: white; }

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
}
.btn-outline:hover { background: var(--secondary); color: white; }

.btn-block { width: 100%; justify-content: center; }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid transparent;
}
.btn-ghost:hover { background: #F1F5F9; color: var(--text); text-decoration: none; }

.btn-secondary {
    background: #F1F5F9;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #E2E8F0; color: var(--text); text-decoration: none; }

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #00c06e; color: #fff; text-decoration: none; }

.btn-warning {
    background: var(--warning);
    color: #92400E;
}
.btn-warning:hover { background: #e5b33c; color: #92400E; text-decoration: none; }

/* ---------- Auth Form ---------- */
.auth-form .btn-primary {
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    font-size: 1rem;
}

/* ---------- Utility ---------- */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Responsive kuralları dosya sonunda birleştirildi — bkz. "Responsive Breakpoint'ler" */

/* ============================================================
   Aşama 2 — Kullanıcı & Rol Yönetimi Stilleri
   ============================================================ */

/* ---------- Tablo ---------- */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

/* Sprint 3B TD-7: inline style yerine, küçük varyant + şirket belgesi history özel */
.table-sm { font-size: 0.84rem; }
.table-sm td, .table-sm th { padding: 0.4rem 0.5rem; }
.doc-history-table { margin: 0; }
.doc-history-uploader { font-size: 0.8rem; color: var(--text-muted); }

.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: #F8FAFC;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    white-space: nowrap;
}

.table tbody tr:hover { background: #F8FAFC; }
.table tbody tr:last-child td { border-bottom: none; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* A11Y-P1-30: WCAG 1.4.11 — 1px border non-text contrast (badge bg vs surrounding) */
.badge-success { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.badge-danger  { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.badge-info    { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; }
.badge-warning { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.badge-role    { background: #EEF2FF; color: #4338CA; border-color: #C7D2FE; }

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #EEF2FF;
    color: #4338CA;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* ---------- Action Buttons ---------- */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all var(--transition);
    text-decoration: none;
}

.btn-icon:hover { background: #F1F5F9; color: var(--secondary); border-color: var(--secondary); text-decoration: none; }
.btn-icon-danger:hover { background: #FEE2E2; color: var(--danger); border-color: var(--danger); }

/* ---------- User Cell ---------- */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.fw-600 { font-weight: 600; }
.text-sm { font-size: 0.8rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1rem; }

/* ---------- Filter Row ---------- */
.filter-form { }

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-item { min-width: 160px; flex: 1; }
.filter-item-lg { min-width: 220px; flex: 2; }
.filter-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ---------- Form Card ---------- */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}

.form-group-full { grid-column: 1 / -1; }

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.form-error {
    display: block;
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

/* P2-25: Form alan altı yardım metni (önceden inline style "color:#6B7280") */
.form-help {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-input.is-invalid, .form-select.is-invalid {
    border-color: var(--danger);
}

.req { color: var(--danger); }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* Toggle Switch */
.form-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.form-toggle input { display: none; }

.toggle-slider {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #CBD5E1;
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.form-toggle input:checked + .toggle-slider { background: var(--success); }
.form-toggle input:checked + .toggle-slider::after { transform: translateX(18px); }

.toggle-label { font-size: 0.875rem; font-weight: 500; }

/* ---------- Detail Page ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 auto 1.25rem;
}

.detail-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.detail-table th {
    width: 35%;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    vertical-align: top;
}
.detail-table td { padding: 0.5rem 0; vertical-align: top; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }

/* ---------- Permissions ---------- */
.perm-module {
    margin-bottom: 1rem;
}

.perm-module-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.perm-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.perm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: #D1FAE5;
    color: #065F46;
    font-size: 0.78rem;
    font-weight: 500;
}

/* Permission Grid (roles/show.php) */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.perm-module-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.perm-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.875rem;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
}

.perm-module-name { font-weight: 700; font-size: 0.85rem; }

.perm-module-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.perm-module-count.all-granted { color: var(--success); }
.perm-module-count.partial { color: var(--warning); }

.perm-rows { padding: 0.25rem 0; }

.perm-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.875rem;
    font-size: 0.82rem;
}

.perm-row:hover { background: #F8FAFC; }

.perm-check { flex-shrink: 0; font-size: 0.85rem; }
.perm-name { flex: 1; }
.perm-code { font-size: 0.72rem; color: var(--text-muted); background: #F1F5F9; padding: 1px 5px; border-radius: 3px; }

.perm-granted { }
.perm-denied  { opacity: 0.45; }

/* ---------- Role List Styles ---------- */
.code-badge {
    background: #F1F5F9;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}

.level-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.level-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 999px;
}

/* ---------- Pagination ---------- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-info { font-size: 0.82rem; color: var(--text-muted); }

.pagination {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Site-Wide Review S8-A (A11Y-P1-16): WCAG 2.5.5 touch target → min 44×44 */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.page-btn:hover { background: #EEF2FF; color: var(--secondary); border-color: var(--secondary); text-decoration: none; }
.page-btn.active { background: var(--secondary); color: white; border-color: var(--secondary); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* ---------- Şirket Tipi Badge'leri (Aşama 3) ---------- */
.badge-type-osgb                { background: #1E3A5F; color: #fff; }
.badge-type-dealer              { background: #E30613; color: #fff; }
.badge-type-external_contractor { background: #F39200; color: #fff; }

/* ---------- Form Bölümleri (Aşama 3) ---------- */
.form-section { margin-bottom: 2rem; }

.form-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #95aac9;
    border-bottom: 1px solid var(--border);
    padding-bottom: .5rem;
    margin-bottom: 1.25rem;
}

/* ---------- Şirket Avatar (show sayfası) ---------- */
.company-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
}

/* ---------- Badge Count (kullanıcı sayısı gibi sayısal badge) ---------- */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #EEF2FF;
    color: var(--secondary);
    font-size: .75rem;
    font-weight: 700;
}

/* ---------- Card Header ---------- */
.card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ---------- Utility ---------- */
.fw-600   { font-weight: 600; }
/* P2-20: .text-right ve .text-center utility sınıfları üstte (L900-901) !important ile
   tanımlı — tekrarları kaldırıldı. */
.mb-1     { margin-bottom: 1rem; }
/* M08 Sprint 41 WCAG W-P1-2 SC 2.5.5 Target Size:
   btn-sm 40→44px (WCAG 2.1 AAA + 2.2 AA SC 2.5.8). Tablo aksiyon butonları
   44×44px hedefine çıkarıldı. İkon-only butonlar min-width:44px ile kare.
   Padding 0.45→0.55rem (yükseklik artışıyla orantılı). */
.btn-sm   { padding: .55rem .75rem; font-size: .82rem; min-height: 44px; min-width: 44px; }
.btn-info { background: var(--info); color: #fff; border-color: var(--info); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c82d47; border-color: #c82d47; }

/* ============================================================
   Phase 0C — Modal Temel Sınıfları
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0,0,0,.55);
    align-items: center;
    justify-content: center;
    display: flex;
    backdrop-filter: blur(2px);
}

/* Ortak modal kutu stilleri — sm/lg varyantları da aynı zemin/gölge/yuvarlağı alır */
.modal-box,
.modal-box-sm,
.modal-box-lg {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}
.modal-box    { width: min(560px, 95vw); }
.modal-box-sm { width: min(400px, 95vw); }
.modal-box-lg { width: min(800px, 95vw); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}
.modal-close:hover { color: var(--text); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================================
   Phase 0D — Utility Sınıfları
   ============================================================ */

/* --- Display & Flex --- */
.d-flex        { display: flex; }
.d-grid        { display: grid; }
.d-inline-flex { display: inline-flex; }
.d-block       { display: block; }
.d-inline      { display: inline; }
.d-none        { display: none; }

.flex-wrap     { flex-wrap: wrap; }
.flex-col      { flex-direction: column; }
.flex-1        { flex: 1; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.justify-center { justify-content: center; }

/* --- Gap --- */
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 0.75rem; }
.gap-lg { gap: 1rem; }
.gap-xl { gap: 1.5rem; }

/* --- Grid Templates --- */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* --- Spacing --- */
.m-0  { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.p-0  { padding: 0; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }

/* --- Typography --- */
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-xs  { font-size: 0.75rem; }
.fs-sm  { font-size: 0.8rem; }
.fs-md  { font-size: 0.9rem; }
.fs-lg  { font-size: 1.1rem; }
.fs-xl  { font-size: 1.25rem; }

/* Sprint 4C SYS-04: WCAG 2.1 AA kontrast uyumu.
   --danger/--success/--warning ana renkleri solid badge/progress için parlak; küçük
   metinde beyaz arka planda AA fail (1.9-3.8:1). Dark text tokenleri ile override. */
.text-danger  { color: var(--danger-text); }
.text-success { color: var(--success-text); }
.text-warning { color: var(--warning-text); }
.text-primary { color: var(--primary); }
.text-info    { color: var(--info); }
.text-secondary { color: var(--secondary); }
.text-white   { color: #fff; }
.text-left    { text-align: left; }
.text-nowrap  { white-space: nowrap; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Detail Label (177x tekrar eden pattern) --- */
.detail-label {
    width: 160px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Page Actions (header icindeki buton gruplari) --- */
.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* --- Width Utilities --- */
.w-full    { width: 100%; }
.w-auto    { width: auto; }
.max-w-sm  { max-width: 400px; }
.max-w-md  { max-width: 560px; }
.max-w-lg  { max-width: 800px; }
.max-w-xl  { max-width: 1000px; }

/* --- Table Helpers --- */
.table th.w-sm { width: 120px; }
.table th.w-md { width: 180px; }
.table th.w-lg { width: 240px; }
.table td.numeric,
.numeric { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Background Utilities --- */
.bg-light   { background: #F8FAFC; }
.bg-white   { background: var(--white); }
.bg-danger  { background: var(--danger); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-info    { background: var(--info); }
.bg-primary { background: var(--primary); }

/* --- Border & Radius --- */
.border     { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 999px; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* --- Visibility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* M04 Sprint 1C P1-47: Skip-to-main-content (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    z-index: 10000;
    background: var(--primary, #1E3A5F);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.1s ease-in;
}
.skip-link:focus {
    top: 8px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --- Attendance Live (from attendance/live.php) --- */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* --- Document Generator Templates (from document-generator/templates.php) --- */
.template-modal-overlay { position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,0.5); }
.template-modal-overlay[x-show],
.template-modal-overlay.active { display:flex; }

/* --- Sidebar Nav Groups --- */
.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    text-align: left;
    transition: all 0.2s ease;
}
.nav-group-toggle:hover {
    color: var(--text);
    background: #F8FAFC;
}
.nav-group-label-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.sidebar.mini .nav-group-label-text { display: none; }
.nav-group-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: #94A3B8;
}
.sidebar.mini .nav-group-chevron { display: none; }
.nav-icon svg, .nav-icon i[data-lucide] {
    width: 18px;
    height: 18px;
    display: block;
}
/* Lucide icon sizing within nav */
.nav-icon [data-lucide] { width: 18px; height: 18px; }
.nav-group-toggle .nav-group-icon { width: 18px; height: 18px; flex-shrink: 0; color: #64748B; }
.sidebar.mini .nav-group-toggle { justify-content: center; padding: 0.6rem; }

/* --- Tabs (unified) --- */
.tab-bar, .payment-tabs, .project-tabs {
    display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:1.25rem; overflow-x:auto;
}
.tab-btn {
    padding:.75rem 1.25rem; border:none; background:transparent; cursor:pointer;
    color:var(--text-muted); font-size:.875rem; font-weight:500; white-space:nowrap;
    border-bottom:2px solid transparent; margin-bottom:-2px; transition:all .15s;
}
.tab-btn:hover { color:var(--secondary); border-bottom-color:rgba(44,123,229,.3); }
.tab-btn.tab-active, .tab-btn.active { color:var(--secondary); border-bottom-color:var(--secondary); font-weight:600; }

.dropdown-item { display:block; width:100%; padding:.5rem 1rem; background:none; border:none; cursor:pointer; text-align:left; font-size:.85rem; color:var(--text); text-decoration:none; }
.dropdown-item:hover { background:#f3f4f6; color:var(--text); }

/* Site-Wide Review S9-D (DC-P1-29): Recursive checkbox tree (work-permits/form
   bölge listesi, başka recursive seçim formları için yeniden kullanılabilir).
   data-level attribute (0..N) padding-left ile indent sağlar. */
.checkbox-tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    cursor: pointer;
}
.checkbox-tree-item[data-level="1"] { padding-left: 20px; }
.checkbox-tree-item[data-level="2"] { padding-left: 40px; }
.checkbox-tree-item[data-level="3"] { padding-left: 60px; }
.checkbox-tree-item[data-level="4"] { padding-left: 80px; }
.checkbox-tree-item[data-level="5"] { padding-left: 100px; }

/* Site-Wide Review S4-E (DC-P1-11, PM-P1-28): Quick filter chip — personnel/work-permits index'lerinde inline tekrarlanan stilin component'i */
.filter-chip {
    display:inline-flex; align-items:center; gap:.25rem;
    background:#f1f5f9; color:#64748b;
    border:1px solid #e2e8f0; border-radius:20px;
    font-size:.75rem; font-weight:500;
    padding:.2rem .75rem;
    cursor:pointer; transition:var(--transition);
}
.filter-chip:hover { background:#e2e8f0; color:var(--primary); border-color:#cbd5e1; }
.filter-chip-active {
    background:var(--primary); color:#fff; border-color:var(--primary);
}
.filter-chip-active:hover { background:var(--primary-dark); border-color:var(--primary-dark); color:#fff; }
.filter-chip:focus-visible { outline:2px solid var(--secondary); outline-offset:2px; }
/* M08 Sprint 14 W-P0-7: dropdown-item klavye odak netliği */
.dropdown-item:focus-visible { background:#f3f4f6; outline:2px solid var(--secondary,#2C7BE5); outline-offset:-2px; }
/* M08 Sprint 14 W-P0-7: tab butonu klavye odağı */
.tab-btn:focus-visible { outline:2px solid var(--secondary,#2C7BE5); outline-offset:2px; border-radius:4px; }

/* M08 Sprint 14 W-P0-8: Empty state semantic pattern + CTA.
   role="status" içerilen metin ekran okuyucu tarafından politely duyurulur.
   .empty-state-cta primer aksiyon butonu için dikey boşluk sağlar. */
.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    background: #fafbfc;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.empty-state-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.5; }
.empty-state-title { font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.empty-state-text { font-size: 0.875rem; margin-bottom: 1rem; }
.empty-state-cta { margin-top: 1rem; }


/* --- Kanban Board (from project-management/kanban/board.php) --- */
.sortable-ghost { opacity: .4; }
.sortable-drag { box-shadow: 0 4px 12px rgba(0,0,0,.15); transform: rotate(2deg); }
/* P2-21: inline style tekrarı class'a taşındı. */
.kanban-card {
    background: #fff;
    border-radius: 6px;
    padding: .65rem .75rem;
    margin-bottom: .5rem;
    border: 1px solid var(--border);
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.kanban-card:hover { border-color: var(--secondary); }
.kanban-card:active { cursor: grabbing; }
.kanban-cards {
    flex: 1;
    padding: .5rem;
    overflow-y: auto;
    min-height: 60px;
}
.btn-card-edit {
    opacity: 0;
    transition: opacity .15s;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .7rem;
    color: var(--text-muted);
    padding: 0 2px;
    flex-shrink: 0;
}
.kanban-card:hover .btn-card-edit { opacity: 1; }

/* --- WBS Index (from project-management/wbs/index.php) --- */
/* ---- WBS Sayfa-ici ek stiller ---- */
.wbs-nav { display:flex; overflow-x:auto; gap:0; background:var(--white); border-radius:var(--radius); border:1px solid var(--border); box-shadow:var(--shadow); margin-bottom:1.25rem; }
.wbs-nav a { padding:.7rem 1.25rem; font-weight:600; font-size:.85rem; text-decoration:none; color:var(--text-muted); white-space:nowrap; border-bottom:2.5px solid transparent; transition:all .15s; }
.wbs-nav a:hover { color:var(--secondary); background:rgba(44,123,229,.04); text-decoration:none; }
.wbs-nav a.active { border-bottom-color:var(--secondary); color:var(--secondary); background:rgba(44,123,229,.04); }

/* WBS Tablo ek stilleri (table sinifini genisletir) */
.wbs-table tbody tr.wbs-level-1 { background:#EEF4FF; }
.wbs-table tbody tr.wbs-level-1:hover { background:#E0EAFF; }
.wbs-table tbody tr.wbs-level-1 td { font-weight:600; }
.wbs-table tbody tr.wbs-level-2 { background:#F8FAFC; }
.wbs-table tbody tr.wbs-critical { background:#FEF2F2; }
.wbs-table tbody tr.wbs-critical:hover { background:#FEE2E2; }

.wbs-toggle { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border:1px solid var(--border); background:var(--white); cursor:pointer; font-size:.7rem; color:var(--text-muted); border-radius:var(--radius-sm); margin-right:.35rem; flex-shrink:0; transition:all .15s; }
.wbs-toggle:hover { background:rgba(44,123,229,.08); color:var(--secondary); border-color:var(--secondary); }

.wbs-code { color:var(--text-muted); font-size:.78rem; font-weight:700; margin-right:.4rem; font-family:'Courier New',monospace; }
.wbs-name { font-size:.875rem; }
.wbs-level-1 .wbs-name { font-size:.92rem; font-weight:700; color:var(--text); }
.wbs-level-2 .wbs-name { font-weight:600; }

.wbs-progress-bar { flex:1; background:var(--border); border-radius:var(--radius-sm); height:7px; min-width:50px; overflow:hidden; }
.wbs-progress-fill { height:100%; border-radius:var(--radius-sm); transition:width .3s; }
.wbs-progress-text { font-size:.78rem; min-width:36px; text-align:right; font-weight:700; }

/* Range slider */
input[type="range"].wbs-slider { -webkit-appearance:none; appearance:none; width:52px; height:4px; background:var(--border); border-radius:2px; outline:none; cursor:pointer; flex-shrink:0; }
input[type="range"].wbs-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:12px; height:12px; border-radius:50%; background:var(--secondary); cursor:pointer; border:2px solid var(--white); box-shadow:0 0 0 1px var(--secondary); }
input[type="range"].wbs-slider::-moz-range-thumb { width:12px; height:12px; border-radius:50%; background:var(--secondary); cursor:pointer; border:2px solid var(--white); box-shadow:0 0 0 1px var(--secondary); }
input[type="range"].wbs-slider::-webkit-slider-runnable-track { height:4px; border-radius:2px; background:var(--border); }

/* Aksiyon butonlari */
.wbs-actions { display:flex; gap:.35rem; }
.wbs-actions .btn { padding:.25rem .5rem; }

/* Modal overlay */
.wbs-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1000; align-items:center; justify-content:center; backdrop-filter:blur(2px); }
.wbs-modal-card { background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow-md); padding:1.5rem; max-width:95vw; }
.wbs-modal-title { font-family:var(--font-heading); font-size:1.05rem; font-weight:700; color:var(--text); margin:0 0 1.25rem; }

/* Form label */
.wbs-label { display:block; font-size:.8rem; font-weight:600; color:var(--text); margin-bottom:.3rem; }

/* --- Gantt Chart (from project-management/gantt/chart.php) --- */
/* Gantt container — SVG tasmasi icin overflow ayarlari */
.gantt-card { overflow:visible; }
.gantt-card .card-body { overflow:visible; padding:0; }
#gantt-chart { min-height:200px; }
/* Frappe Gantt kendi .gantt-container'ini olusturur — scroll orada olur */
#gantt-chart .gantt-container { overflow-x:auto !important; overflow-y:hidden; max-width:100%; }
/* Frappe Gantt SVG genisligini kendi hesaplasin — force etmeyin */

/* Kritik yol kirmizi */
.bar-critical .bar-progress, .bar-critical .bar { fill: var(--danger) !important; }
.bar-critical .bar { fill: #f5a3b0 !important; }
.bar-critical .bar-progress { fill: var(--danger) !important; }
/* Kilometre tasi */
.bar-milestone .bar { fill: var(--warning) !important; }
.bar-milestone .bar-progress { fill: #d4a017 !important; }
/* Genel Gantt stili */
.gantt .bar { fill: #c5d8f0; }
.gantt .bar-progress { fill: var(--secondary); }
.gantt .bar-label { fill: var(--primary); font-size: 12px; }
/* Gorunum butonlari */
.gantt-view-btn { display:inline-flex; align-items:center; padding:.3rem .75rem; border:1.5px solid var(--border); border-radius:var(--radius-sm); background:var(--white); cursor:pointer; color:var(--text-muted); font-size:.82rem; font-weight:600; transition:all .15s; font-family:inherit; }
.gantt-view-btn:hover { border-color:var(--secondary); color:var(--secondary); }
.gantt-view-btn.active { background:var(--secondary); color:var(--white); border-color:var(--secondary); }

/* ============================================================
   Responsive Breakpoint'ler (Birleştirilmiş)
   ============================================================ */

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) {
    .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* --- Mini mode: main-content margin --- */
.sidebar.mini ~ .main-content, .sidebar.mini + .sidebar-overlay + .main-content { margin-left: 72px; }

/* --- Mobil (768px) --- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle { display: block; }
    .sidebar-toggle-btn { display: none; }
    .hamburger { display: flex; }
    .main-content { margin-left: 0 !important; }
    .user-details { display: none; }

    .form-grid { grid-template-columns: 1fr; }
    .perm-grid { grid-template-columns: 1fr; }
    .filter-row { flex-direction: column; }
    .filter-item, .filter-item-lg { width: 100%; min-width: auto; flex: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-actions { justify-content: flex-start; }
}

/* --- Küçük Mobil (480px) --- */
@media (max-width: 480px) {
    .page-content { padding: 1rem; }
    .card-body { padding: 0.75rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .modal-box { padding: 1rem; }
}

/* ---------- Wizard Stepper ---------- */
.wizard-stepper {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.wizard-step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 700;
    background: var(--border-color);
    color: var(--text-muted);
    transition: all .25s ease;
    flex-shrink: 0;
}
.wizard-step-circle.circle-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30,58,95,.25);
}
.wizard-step.is-done .wizard-step-circle.circle-active {
    background: var(--success);
}
.wizard-step-label {
    font-size: .82rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all .2s ease;
}
.wizard-step-label.label-active {
    color: var(--primary);
    font-weight: 600;
}
.wizard-step.is-done .wizard-step-label.label-active {
    color: var(--success);
}
.wizard-step-line {
    flex: 1;
    height: 2px;
    margin: 0 .75rem;
    background: var(--border-color);
    border-radius: 2px;
    transition: background .3s ease;
    min-width: 20px;
}
.wizard-step-line.line-active {
    background: var(--success);
}
@media (max-width: 480px) {
    .wizard-stepper { padding: 1rem; }
    .wizard-step-label { display: none; }
    .wizard-step-line { margin: 0 .35rem; }
}

/* ============================================================
   Print Stilleri
   ============================================================ */
@media print {
    /* Sidebar, header, butonlar gizle */
    .sidebar,
    .sidebar-overlay,
    .app-header,
    .hamburger,
    .sidebar-toggle-btn,
    .btn,
    .form-actions,
    .page-actions,
    .modal-overlay,
    .flash { display: none !important; }

    /* İçeriği tam genişliğe yay */
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    .app-wrapper { display: block; }

    /* Sayfa arkaplanı beyaz, metin siyah */
    body { background: #fff !important; color: #000 !important; font-size: 12pt; }
    .card { box-shadow: none !important; border: 1px solid #ddd; break-inside: avoid; }
    .card-header { background: #f5f5f5 !important; }

    /* Tablo satırlarını bölme */
    table { break-inside: auto; }
    tr { break-inside: avoid; }
    thead { display: table-header-group; }

    /* Linkler → URL göster */
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    .nav-item a::after, .sidebar a::after { content: none; }

    /* Stats grid düzeni */
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .stat-card { border: 1px solid #ddd; }

    /* Progress bar görünürlüğü */
    [style*="background:var(--primary)"],
    [style*="background:#2C7BE5"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* Badge renklerini koru */
    .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 1px solid #ccc; }
}

/* ---------- Belge İnceleme Modal (Access Control) ---------- */
.doc-review-layout { display: grid; grid-template-columns: 340px 1fr; height: 65vh; }
.doc-list-panel { border-right: 1px solid var(--border); overflow-y: auto; background: #fafbfc; }
.doc-preview-panel { display: flex; flex-direction: column; overflow: hidden; }

.doc-item { display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid #f0f2f4; cursor: pointer; transition: background .1s; }
.doc-item:hover { background: #f0f4f8; }
.doc-item.active { background: #e8f0fe; border-left: 3px solid var(--secondary); }
.doc-item.doc-missing { opacity: .7; cursor: default; }

.doc-icon { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.doc-icon-pdf { background: #fde8ec; color: var(--danger); }
.doc-icon-img { background: #e3f2fd; color: var(--secondary); }
.doc-icon-missing { background: #f5f5f5; color: #bbb; }

.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: .72rem; color: var(--text-muted); display: flex; gap: .5rem; align-items: center; margin-top: .15rem; }

.doc-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-approved { background: var(--success); }
.dot-pending { background: var(--warning); }
.dot-rejected { background: var(--danger); }
.dot-missing { background: #ccc; }
.dot-expired { background: var(--danger); animation: dot-pulse 1.5s infinite; }
/* Sprint 20 (DC-P1-12): Generic dot indicator — dynamic background için (meeting type color, vb.) */
.dot-indicator { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
@keyframes dot-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.doc-actions-inline { display: flex; gap: .25rem; flex-shrink: 0; }
.doc-action-btn { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .8rem; color: var(--text-muted); transition: all .15s; }
.doc-action-btn:hover { background: var(--bg); color: var(--text); }
.doc-action-btn.approve:hover { background: rgba(0,217,126,.1); color: #00875a; border-color: var(--success); }
.doc-action-btn.reject:hover { background: rgba(230,55,87,.08); color: var(--danger); border-color: var(--danger); }

.preview-toolbar { padding: .5rem 1rem; background: #f8f9fa; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.preview-toolbar .doc-title-bar { font-weight: 600; font-size: .88rem; }
.preview-area { flex: 1; display: flex; align-items: center; justify-content: center; background: #e9ecef; overflow: auto; position: relative; }
.preview-area iframe { width: 100%; height: 100%; border: none; }
.preview-area img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-placeholder { color: var(--text-muted); text-align: center; padding: 2rem; }
.preview-placeholder .icon { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }

.doc-class-header { padding: .5rem 1rem; background: #eef1f5; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-bottom: 1px solid #dde3ea; position: sticky; top: 0; z-index: 1; }

.doc-summary-bar { display: flex; gap: 1rem; padding: .65rem 1rem; background: var(--white); border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.doc-summary-item { display: flex; align-items: center; gap: .35rem; font-size: .78rem; }
.doc-summary-count { font-weight: 700; font-size: .88rem; }

.progress-ring { position: relative; width: 48px; height: 48px; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring .label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; }

@media (max-width: 768px) {
    .doc-review-layout { grid-template-columns: 1fr; height: auto; }
    .doc-list-panel { max-height: 250px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   M03 Sprint 2B — A11y global rules
   U-29 focus-visible, U-16 form-check, U-20 row-full, U-09 progress
   ============================================================ */

/* Alpine x-cloak — DOM parse anında gizli, Alpine init edince gösterilir */
[x-cloak] { display: none !important; }

/* U-29: Klavye odağı her etkileşimli öğede görünür olsun (WCAG 2.4.7) */
:focus-visible {
    outline: 2px solid var(--secondary, #2C7BE5);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
/* Buton içindeki :focus default outline'ı kaldırıp :focus-visible lehine bırakma */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

/* U-16: Checkbox/radio label wrapper — 44px touch target (WCAG 2.5.5 AAA, iyi UX) */
.form-check {
    min-height: 44px;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
}

/* U-20: "DOLU" satır + geçmiş satırlar için kontrast AA */
.row-full {
    background: #fef2f4;
    color: #1e3a5f;
}
.row-past {
    color: var(--text-secondary);
}
/* row-past opacity ezilmiş — sticky kolon arka planı bozulmasın */
.row-past td { background: inherit; }

/* U-09: Progress bar a11y (role="progressbar") */
.progress {
    display: inline-block;
    background: #e2e8f0;
    border-radius: var(--radius-sm);
    height: 8px;
    width: 80px;
    overflow: hidden;
    vertical-align: middle;
    flex-shrink: 0;
}
.progress-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    background: var(--success);
    transition: width 0.3s ease;
}
.progress[data-status="warn"] .progress-bar { background: var(--warning); }
.progress[data-status="full"] .progress-bar { background: var(--danger); }

/* M04 Sprint 6 P3-7 — Vestibular-triggered kullanıcılar için animasyon azaltma
   (WCAG 2.3.3 Animation from Interactions). */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* M17 v2 PR-7b Task 13 — Gantt LOB rollup bar (primary color + click cursor).
   WbsTreeService::ganttData çıktısında is_lob_rollup=1 olan WBS bucket'leri
   için özel stil. Tıklandığında LOB aktivite şemasına yönlendirir. */
.gantt .bar-wrapper.bar-lob-rollup {
    cursor: pointer;
}
.gantt .bar-wrapper.bar-lob-rollup .bar {
    fill: #1E3A5F !important;
    stroke: #0e1f35 !important;
}
.gantt .bar-wrapper.bar-lob-rollup:hover .bar {
    fill: #2C7BE5 !important;
}
.gantt .bar-wrapper.bar-lob-rollup .bar-label {
    fill: #fff;
    font-weight: 600;
}

