/* ============================================================
   ADANA İL SAĞLIK MÜDÜRLÜĞÜ - İŞ VE GÖREV TAKİP SİSTEMİ
   Kurumsal Tema
   ============================================================ */

:root {
    --turquoise: #00A59A;
    --turquoise-dark: #00857C;
    --turquoise-light: #E6F7F5;
    --navy: #1B3A5C;
    --navy-light: #2C5078;
    --red: #DC2626;
    --red-light: #FDECEC;
    --amber: #D97706;
    --amber-light: #FEF3E2;
    --gray-50: #F7F9FA;
    --gray-100: #EEF1F3;
    --gray-300: #D1D9DE;
    --gray-500: #74858F;
    --gray-700: #3D4A52;
    --gray-900: #1E2A30;
    --white: #FFFFFF;
    --radius: 10px;
    --shadow-soft: 0 1px 3px rgba(27, 58, 92, 0.08), 0 1px 2px rgba(27, 58, 92, 0.06);
    --shadow-mid: 0 4px 12px rgba(27, 58, 92, 0.10);
    --font-display: 'Outfit', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--gray-50);
    color: var(--gray-900);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--navy);
}

a { color: var(--turquoise-dark); text-decoration: none; }
a:hover { color: var(--navy); }

:focus-visible {
    outline: 2px solid var(--turquoise);
    outline-offset: 2px;
}

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

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--navy) 0%, #142C45 100%);
    color: #DCE6EE;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand img { height: 38px; width: auto; }
.sidebar-brand .title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.sidebar-brand .subtitle {
    font-size: 11px;
    color: var(--turquoise);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border-radius: 8px;
    color: #BBCBD9;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active {
    background: var(--turquoise);
    color: #fff;
}
.sidebar-nav .nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.35);
    padding: 16px 14px 6px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar h1 { font-size: 18px; margin: 0; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 30px;
    background: var(--gray-50);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--turquoise);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.user-chip .name { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.user-chip .role { font-size: 11px; color: var(--gray-500); }

.page-body { padding: 28px; flex: 1; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--navy);
    cursor: pointer;
}

@media (max-width: 920px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: inline-flex; }
    .page-body { padding: 18px; }
    .topbar { padding: 12px 16px; }
}

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}
.card-body { padding: 20px 22px; }
.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}
.stat-card .stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}
.stat-card.accent-turquoise .stat-icon { background: var(--turquoise-light); color: var(--turquoise-dark); }
.stat-card.accent-navy .stat-icon { background: #E8EEF4; color: var(--navy); }
.stat-card.accent-red .stat-icon { background: var(--red-light); color: var(--red); }
.stat-card.accent-amber .stat-icon { background: var(--amber-light); color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter 0.12s, background 0.12s;
    text-decoration: none;
}
.btn-primary { background: var(--turquoise); color: #fff; }
.btn-primary:hover { background: var(--turquoise-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-light); }
.btn-outline { background: transparent; border-color: var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-50); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    display: block;
}
.form-control, .form-select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--white);
    color: var(--gray-900);
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px var(--turquoise-light);
}
.form-group { margin-bottom: 18px; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-acil { background: var(--red-light); color: var(--red); }
.badge-normal { background: var(--turquoise-light); color: var(--turquoise-dark); }
.badge-dusuk { background: var(--gray-100); color: var(--gray-500); }
.badge-bekliyor { background: var(--amber-light); color: var(--amber); }
.badge-devam { background: #E6F0FA; color: #1D6FB8; }
.badge-tamamlandi { background: #E7F5EC; color: #1A8A4A; }
.badge-iptal { background: var(--gray-100); color: var(--gray-500); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    padding: 12px 16px;
    border-bottom: 2px solid var(--gray-100);
    white-space: nowrap;
}
table.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-900);
}
table.data-table tbody tr:hover { background: var(--gray-50); }

/* ---------- Auth pages ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #0F2238 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-wrap::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,165,154,0.18), transparent 70%);
    top: -200px; right: -150px;
}
.auth-card {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 18px; }
.auth-logo img { height: 56px; }
.auth-title { text-align: center; font-size: 19px; margin-bottom: 4px; }
.auth-subtitle { text-align: center; font-size: 13px; color: var(--gray-500); margin-bottom: 28px; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: 12px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 13px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: #E7F5EC; color: #1A8A4A; }
.alert-error { background: var(--red-light); color: var(--red); }
.alert-info { background: var(--turquoise-light); color: var(--turquoise-dark); }
.alert-warning { background: var(--amber-light); color: var(--amber); }

/* ---------- Misc ---------- */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray-500);
}
.empty-state svg { width: 56px; height: 56px; color: var(--gray-300); margin-bottom: 14px; }

.priority-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.priority-dot.acil { background: var(--red); }
.priority-dot.normal { background: var(--turquoise); }
.priority-dot.dusuk { background: var(--gray-300); }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 { font-size: 22px; margin: 0; }
.page-header p { color: var(--gray-500); font-size: 13.5px; margin: 4px 0 0; }

.notif-dot {
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    position: absolute;
    top: 6px; right: 6px;
    border: 2px solid #fff;
}
.icon-btn {
    position: relative;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--gray-50);
    color: var(--gray-700);
    border: none;
    cursor: pointer;
}
.icon-btn:hover { background: var(--gray-100); }
