/* ═══════════════════════════════════════════════════════════════
   İyilik Hali — Klinik Panel Tema
   Orijinal GAS tasarımına birebir sadık
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Ana renkler — İyilik Hali "moss" paleti (SvelteKit teması ile birebir) */
    --ih-primary: #3D5A3D;        /* ih-500 */
    --ih-primary-dark: #344F34;   /* ih-600 */
    --ih-primary-light: #E4ECE0;  /* ih-100 */
    --ih-secondary: #6B8E6B;      /* moss-2 / ih-400 */
    --ih-accent: #B97A4A;         /* clay */

    /* Arka plan */
    --ih-bg-body: #F5F1EA;        /* zemin */
    --ih-bg-sidebar: #1C2B1C;     /* derin moss (ih-900) */
    --ih-bg-card: #FAF7F0;        /* yüzey */
    --ih-bg-header: #FFFFFF;

    /* Metin */
    --ih-text-primary: #1C1F19;   /* metin */
    --ih-text-secondary: #6A6458; /* soluk */
    --ih-text-muted: #9A917F;
    --ih-text-sidebar: #C8D8C2;   /* ih-200 (derin moss üzerinde okunur) */

    /* Kenarlık */
    --ih-border: #D9D1BF;         /* çizgi */
    --ih-border-light: #E4ECE0;

    /* Gölge — düz/yumuşak (SvelteKit flat estetiği) */
    --ih-shadow-sm: 0 1px 2px rgba(28,31,25,0.05);
    --ih-shadow-md: 0 4px 12px rgba(28,31,25,0.07);
    --ih-shadow-lg: 0 8px 24px rgba(28,31,25,0.10);

    /* Sidebar */
    --ih-sidebar-width: 270px;

    /* Durum renkleri */
    --ih-success: #38A169;
    --ih-warning: #DD6B20;
    --ih-danger: #A83E2C;         /* alert (SvelteKit) */
    --ih-info: #3182CE;
}

/* ═══ Genel ═══ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Public Sans', 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--ih-bg-body);
    color: var(--ih-text-primary);
    font-size: 0.9rem;
}

/* ═══ Ana Wrapper — Tam ekran ═══ */
.ih-app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Instrument Serif', Georgia, 'Poppins', serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ih-text-primary);
}

a { color: var(--ih-primary); }
a:hover { color: var(--ih-primary-dark); }

/* ═══ Sidebar ═══ */
.ih-sidebar {
    width: var(--ih-sidebar-width);
    height: 100vh;
    background: var(--ih-bg-sidebar);
    color: var(--ih-text-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s;
}

.ih-sidebar-brand {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.ih-sidebar-brand h5 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

.ih-sidebar-brand small {
    color: var(--ih-text-muted);
    font-size: 0.75rem;
}

/* ═══ Sidebar Scroll ═══ */
.ih-sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}
.ih-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.ih-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

/* ═══ Ana NavLink (Panelim gibi üst seviye) ═══ */
.ih-sidebar > nav > .ih-sidebar-scroll > .nav-link {
    color: var(--ih-text-sidebar);
    padding: 0.6rem 1rem;
    margin: 2px 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    text-decoration: none;
}
.ih-sidebar > nav > .ih-sidebar-scroll > .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.ih-sidebar > nav > .ih-sidebar-scroll > .nav-link.active {
    background: var(--ih-primary);
    color: #fff;
    font-weight: 600;
}
.ih-sidebar > nav > .ih-sidebar-scroll > .nav-link .mdi {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
}

/* ═══ Sidebar Collapsible Grup ═══ */
.sidebar-group {
    margin: 2px 0;
}

.sidebar-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    margin: 1px 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.sidebar-group-toggle:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.03);
}

.sidebar-group.open > .sidebar-group-toggle {
    color: rgba(255,255,255,0.8);
}

.sidebar-group-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.sidebar-group-title {
    font-size: 0.72rem;
}

.sidebar-group-arrow {
    font-size: 0.85rem;
    opacity: 0.4;
    transition: transform 0.2s;
}

.sidebar-group.open > .sidebar-group-toggle .sidebar-group-arrow {
    opacity: 0.7;
}

/* ═══ Grup İçi Alt Linkler ═══ */
.sidebar-group-items {
    animation: sidebarSlideDown 0.2s ease-out;
}

.sidebar-group-items .nav-link.sub {
    color: var(--ih-text-sidebar);
    padding: 0.4rem 1rem 0.4rem 2.4rem;
    margin: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
    text-decoration: none;
    position: relative;
}

.sidebar-group-items .nav-link.sub::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: translateY(-50%);
    transition: all 0.15s;
}

.sidebar-group-items .nav-link.sub:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar-group-items .nav-link.sub:hover::before {
    background: var(--ih-primary);
    width: 5px;
    height: 5px;
}

.sidebar-group-items .nav-link.sub.active {
    background: rgba(6,145,157,0.15);
    color: var(--ih-primary);
    font-weight: 600;
}

.sidebar-group-items .nav-link.sub.active::before {
    background: var(--ih-primary);
    width: 6px;
    height: 6px;
    box-shadow: 0 0 6px rgba(6,145,157,0.5);
}

.sidebar-group-items .nav-link.sub .mdi {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar-group-items .nav-link.sub:hover .mdi,
.sidebar-group-items .nav-link.sub.active .mdi {
    opacity: 1;
}

@keyframes sidebarSlideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ Eski nav-section (geriye uyumluluk) ═══ */
.ih-sidebar .nav-section {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ih-text-muted);
    margin-top: 0.75rem;
}

/* ═══ Genel nav-link (eski sayfalar için) ═══ */
.ih-sidebar .nav-link {
    color: var(--ih-text-sidebar);
    padding: 0.5rem 1rem;
    margin: 1px 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.15s;
    text-decoration: none;
}

.ih-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.ih-sidebar .nav-link.active {
    background: var(--ih-primary);
    color: #fff;
    font-weight: 600;
}

.ih-sidebar .nav-link .mdi {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* ═══ Topbar ═══ */
.ih-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--ih-bg-header);
    border-bottom: 1px solid var(--ih-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--ih-shadow-sm);
}

.ih-topbar h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--ih-primary);
}

/* ═══ Content Area ═══ */
.ih-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ih-main {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ═══ Kartlar ═══ */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--ih-shadow-sm);
    background: var(--ih-bg-card);
}

.card:hover {
    box-shadow: var(--ih-shadow-md);
}

.card-header {
    background: var(--ih-bg-card);
    border-bottom: 1px solid var(--ih-border-light);
    font-weight: 600;
    padding: 0.875rem 1.25rem;
}

/* ═══ Stat Kartları ═══ */
.ih-stat-card {
    border-radius: 12px;
    padding: 1.25rem;
    background: var(--ih-bg-card);
    box-shadow: var(--ih-shadow-sm);
    text-align: center;
    border-left: 4px solid var(--ih-primary);
}

.ih-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.ih-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--ih-text-secondary);
    margin-top: 0.25rem;
}

/* ═══ Tablo ═══ */
.table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ih-text-secondary);
    border-bottom: 2px solid var(--ih-border);
}

.table td {
    vertical-align: middle;
    font-size: 0.85rem;
}

.table-hover tbody tr:hover {
    background-color: var(--ih-primary-light);
}

/* ═══ Badge'ler ═══ */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-ih-primary { background: var(--ih-primary); color: #fff; }
.badge-ih-success { background: var(--ih-success); color: #fff; }
.badge-ih-warning { background: var(--ih-warning); color: #fff; }
.badge-ih-danger { background: var(--ih-danger); color: #fff; }
.badge-ih-info { background: var(--ih-info); color: #fff; }
.badge-ih-secondary { background-color: var(--ih-text-muted, #718096); color: #fff; }

/* ═══ ih-table — özel tablo stili ═══ */
.ih-table {
    border-radius: 8px;
    overflow: hidden;
}
.ih-table thead th {
    background-color: var(--ih-primary-light, #E8F6F7);
    color: var(--ih-primary, #06919D);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem 1rem;
}
.ih-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: #f0f0f0;
}
.ih-table tbody tr:hover {
    background-color: rgba(6, 145, 157, 0.04);
}

/* ═══ Form ═══ */
.form-control:focus, .form-select:focus {
    border-color: var(--ih-primary);
    box-shadow: 0 0 0 0.2rem rgba(6,145,157,0.15);
}

.btn-primary {
    background-color: var(--ih-primary);
    border-color: var(--ih-primary);
}

.btn-primary:hover {
    background-color: var(--ih-primary-dark);
    border-color: var(--ih-primary-dark);
}

.btn-outline-primary {
    color: var(--ih-primary);
    border-color: var(--ih-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ih-primary);
    border-color: var(--ih-primary);
}

/* ═══ Progress ═══ */
.progress {
    border-radius: 6px;
    height: 8px;
    background: var(--ih-border-light);
}

/* ═══ Footer ═══ */
.ih-footer {
    background: var(--ih-bg-header);
    border-top: 1px solid var(--ih-border);
    padding: 0.75rem 1.5rem;
    text-align: center;
    color: var(--ih-text-muted);
    font-size: 0.8rem;
}

/* ═══ Page Header ═══ */
.ih-page-header {
    margin-bottom: 1.5rem;
}

.ih-page-header h4 {
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.ih-page-header p {
    font-size: 0.85rem;
}

/* ═══ Breadcrumb — Premium Soft Pill ═══ */
.ih-breadcrumb {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    backdrop-filter: blur(8px) saturate(140%);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 12px;
    padding: 0.5rem 0.85rem;
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.04);
}

.ih-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.ih-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ih-breadcrumb a {
    color: var(--ih-text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.ih-breadcrumb a:hover {
    color: var(--ih-primary-dark);
    background: var(--ih-soft-primary-bg, rgba(6, 145, 157, 0.10));
    text-decoration: none;
    transform: translateY(-1px);
}

.ih-breadcrumb a .mdi {
    font-size: 1rem;
    line-height: 1;
}

.ih-breadcrumb .separator {
    color: rgba(15, 23, 42, 0.25);
    font-size: 1rem;
}

.ih-breadcrumb .current {
    color: var(--ih-text-primary);
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    background: var(--ih-soft-primary-bg, rgba(6, 145, 157, 0.10));
    color: var(--ih-soft-primary-fg, #057A84);
    border-radius: 8px;
}

/* Mobil: yatay scroll, kırpma yok */
@media (max-width: 576px) {
    .ih-breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
    }
    .ih-breadcrumb ol {
        flex-wrap: nowrap;
    }
}

/* ═══ Menü Kart Grid (GAS tarzı) ═══ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--ih-bg-card);
    border-radius: 14px;
    border: 1px solid var(--ih-border-light);
    box-shadow: var(--ih-shadow-sm);
    text-decoration: none;
    color: var(--ih-text-primary);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ih-shadow-md);
    border-color: var(--card-color, var(--ih-primary));
    text-decoration: none;
    color: var(--ih-text-primary);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--card-color, var(--ih-primary));
    opacity: 0;
    transition: opacity 0.25s;
}

.menu-card:hover::before {
    opacity: 1;
}

.menu-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--card-color, var(--ih-primary));
    background: color-mix(in srgb, var(--card-color, var(--ih-primary)) 10%, transparent);
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.1);
}

.menu-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--ih-text-primary);
}

.menu-card-desc {
    font-size: 0.78rem;
    color: var(--ih-text-secondary);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode menü kartları */
.dark-mode .menu-card {
    background: var(--ih-bg-card);
    border-color: var(--ih-border);
}

.dark-mode .menu-card-title {
    color: var(--ih-text-primary);
}

.dark-mode .menu-card-desc {
    color: var(--ih-text-secondary);
}

.dark-mode .ih-breadcrumb .current {
    color: var(--ih-text-primary);
}

/* ═══ Responsive ═══ */
@media (max-width: 992px) {
    .ih-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
    }
    .ih-sidebar.show {
        transform: translateX(0);
    }
    .ih-content {
        width: 100%;
    }
}

/* ═══ Scrollbar ═══ */
.ih-sidebar::-webkit-scrollbar {
    width: 4px;
}
.ih-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* ═══ Loading ═══ */
.ih-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    flex-direction: column;
    gap: 1rem;
}

.ih-loading .spinner-border {
    color: var(--ih-primary);
}

/* ═══════════════════════════════════════════
   DARK MODE — GAS body.dark-mode karşılığı
   ═══════════════════════════════════════════ */
.dark-mode {
    --ih-bg-body: #1A1D23;
    --ih-bg-card: #22262E;
    --ih-bg-header: #22262E;
    --ih-bg-sidebar: #1E2128;
    --ih-text-primary: #E4E6EB;
    --ih-text-secondary: #A0A8B6;
    --ih-text-muted: #5A6170;
    --ih-text-sidebar: #8B929E;
    --ih-border: #353A45;
    --ih-border-light: #2E333D;
    --ih-shadow-sm: 0 2px 8px rgba(0,0,0,0.20);
    --ih-shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --ih-success-light: rgba(39,174,96,0.15);
    --ih-warning-light: rgba(245,166,35,0.15);
    --ih-danger-light: rgba(231,76,60,0.15);
    --ih-info-light: rgba(52,152,219,0.15);
}

.dark-mode .ih-topbar {
    background: var(--ih-bg-card);
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}

.dark-mode .ih-content {
    background: var(--ih-bg-body);
}

.dark-mode .ih-main {
    color: var(--ih-text-primary);
}

.dark-mode .card, .dark-mode .ih-card {
    background: var(--ih-bg-card);
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}

.dark-mode table {
    color: var(--ih-text-primary);
}
.dark-mode table thead th {
    background: #2A2E38;
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}
.dark-mode table td {
    border-color: var(--ih-border);
}

.dark-mode .form-control, .dark-mode .form-select {
    background: #2A2E38;
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}
.dark-mode .form-control:focus, .dark-mode .form-select:focus {
    background: #2A2E38;
    border-color: var(--ih-primary);
    color: var(--ih-text-primary);
}

.dark-mode .btn-light {
    background: #2A2E38;
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}

.dark-mode .modal-content {
    background: var(--ih-bg-card);
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}

.dark-mode .dropdown-menu {
    background: var(--ih-bg-card);
    border-color: var(--ih-border);
    color: var(--ih-text-primary);
}

.dark-mode .badge.badge-ih-success {
    background: rgba(46,204,113,0.15);
    color: #6edd9a;
}

.dark-mode .ih-footer {
    color: var(--ih-text-muted);
    border-color: var(--ih-border);
}

.dark-mode .bg-white, .dark-mode .bg-light {
    background-color: var(--ih-bg-card) !important;
    color: var(--ih-text-primary) !important;
}

.dark-mode .text-dark {
    color: var(--ih-text-primary) !important;
}
.dark-mode .text-muted {
    color: var(--ih-text-muted) !important;
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM SAĞLIK YAZILIMI TEMASI — v2 override
   - Calm & Trust renk akışı (mevcut teal marka korunarak yumuşatıldı)
   - Soft shadows + glassmorphism kart yapısı
   - Tabular-num rakam hizalama (TC, ölçüm, skor)
   - Soft badge'ler (rgba arka plan + koyu metin)
   - Mikro animasyonlar (hover translateY + transition)
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Yumuşatılmış nötr arka plan + sıcak gri kart yüzeyi */
    --ih-bg-body: #F4F6F8;

    /* Daha geniş, hafif gölgeler — havada yüzme hissi */
    --ih-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
    --ih-shadow-md: 0 6px 16px -4px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    --ih-shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.05);

    /* Yumuşak ve pastel uyarı renkleri (alarm değil, bilgilendirme) */
    --ih-soft-success-bg: rgba(56, 161, 105, 0.10);
    --ih-soft-success-fg: #1F7A4F;
    --ih-soft-warning-bg: rgba(221, 107, 32, 0.10);
    --ih-soft-warning-fg: #B5530F;
    --ih-soft-danger-bg: rgba(244, 63, 94, 0.10);
    --ih-soft-danger-fg: #B91C40;
    --ih-soft-info-bg: rgba(49, 130, 206, 0.10);
    --ih-soft-info-fg: #1E5A98;
    --ih-soft-primary-bg: rgba(6, 145, 157, 0.10);
    --ih-soft-primary-fg: #057A84;
}

/* Inter — modern teknik UI fontu (sayılar için tabular figures destekler) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--ih-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* TC, ölçüm, skor, yaş gibi sayısal alanlar — rakamlar dikey hizalı */
.tabular-num,
.card .display-4, .card .display-5, .card .display-6,
table td, table th,
.badge,
input[type="number"], input[type="tel"] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ═══ Premium Card — soft shadow + büyük radius + transparan border ═══ */
.card {
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    box-shadow: var(--ih-shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--ih-bg-card);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ih-shadow-lg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    padding: 1rem 1.25rem;
}

/* Glassmorphism ipucu — yarı saydam beyaz + blur (hero/özet kartlar için) */
.card-glass {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ═══ Premium Buttons — yumuşak gölge, hover animasyonu ═══ */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.15);
}

.btn-primary {
    background-color: var(--ih-primary);
    border-color: var(--ih-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ih-primary-dark);
    border-color: var(--ih-primary-dark);
}

/* ═══ Form kontrolleri ═══ */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ih-primary);
    box-shadow: 0 0 0 3px rgba(6, 145, 157, 0.12);
}

/* ═══ Soft Badge utilities — arka plan %10 saydam, metin koyu ═══ */
.badge-soft-success { background: var(--ih-soft-success-bg); color: var(--ih-soft-success-fg); font-weight: 600; }
.badge-soft-warning { background: var(--ih-soft-warning-bg); color: var(--ih-soft-warning-fg); font-weight: 600; }
.badge-soft-danger  { background: var(--ih-soft-danger-bg);  color: var(--ih-soft-danger-fg);  font-weight: 600; }
.badge-soft-info    { background: var(--ih-soft-info-bg);    color: var(--ih-soft-info-fg);    font-weight: 600; }
.badge-soft-primary { background: var(--ih-soft-primary-bg); color: var(--ih-soft-primary-fg); font-weight: 600; }

.badge-soft-success, .badge-soft-warning, .badge-soft-danger, .badge-soft-info, .badge-soft-primary {
    border-radius: 8px;
    padding: 0.35em 0.65em;
    letter-spacing: 0.01em;
}

/* ═══ Sekmeler arası yumuşak geçiş ═══ */
.nav-tabs .nav-link, .nav-pills .nav-link {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 10px 10px 0 0;
}

.nav-pills .nav-link {
    border-radius: 10px;
}

.nav-pills .nav-link.active {
    background-color: var(--ih-primary);
}

/* ═══ Tablo — daha okunaklı satır + soft hover ═══ */
.table {
    --bs-table-hover-bg: rgba(6, 145, 157, 0.04);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ih-text-secondary);
    border-bottom: 1px solid var(--ih-border);
    background: transparent;
}

/* ═══ Sidebar başlık tipografi — biraz daha kompakt ve modern ═══ */
.sidebar a, .sidebar .nav-link {
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

/* ═══ Risk skor dairesi — circular progress placeholder ═══ */
.risk-circle {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.risk-circle.low    { background: var(--ih-soft-success-bg); color: var(--ih-soft-success-fg); }
.risk-circle.medium { background: var(--ih-soft-info-bg);    color: var(--ih-soft-info-fg);    }
.risk-circle.high   { background: var(--ih-soft-warning-bg); color: var(--ih-soft-warning-fg); }
.risk-circle.crit   { background: var(--ih-soft-danger-bg);  color: var(--ih-soft-danger-fg);  }

/* ═══ Modal — daha yumuşak görünüm ═══ */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--ih-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

/* Reduced motion uyumu — engelliler için */
@media (prefers-reduced-motion: reduce) {
    .card, .btn, .nav-link {
        transition: none;
    }
    .card:hover, .btn:hover {
        transform: none;
    }
}
