/* Medibakım — Özel Stiller */

/* === Peda Tipografi Sistemi — font yükleme === */
@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/ibm-plex-sans/ibm-plex-sans-latin-ext-wght-normal.woff2")
         format("woff2-variations");
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/ibm-plex-sans/ibm-plex-sans-latin-wght-normal.woff2")
         format("woff2-variations");
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

:root {
    --sidebar-width: 260px;
    --navbar-height: 56px;
    /* Peda Tipografi Token'ları */
    --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
                 "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Roboto Mono", monospace;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --lh-body: 1.6;
    --lh-heading: 1.25;
    --ls-heading: -0.01em;
}

body { font-family: var(--font-sans); font-weight: var(--fw-regular); line-height: var(--lh-body); }
h1, h2, h3, h4 { font-weight: var(--fw-semibold); line-height: var(--lh-heading); letter-spacing: var(--ls-heading); }
strong, b { font-weight: var(--fw-semibold); }
code, pre, kbd { font-family: var(--font-mono); }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
    background-color: #f0f2f5;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    margin: 1px 0.5rem;
}

.sidebar .nav-link:hover {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
}

.sidebar-heading {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #6c757d;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left 0.3s ease;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

/* Card hover */
.card {
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1) !important;
}

/* Table hover */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* Navbar */
.navbar {
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.1rem;
}

/* Badge */
.badge {
    font-weight: 500;
}

/* Form */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Pagination */
.pagination .page-link {
    color: #0d6efd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Print */
@media print {
    .sidebar, .navbar, .btn, .pagination {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Status colors */
.status-active { color: #198754; }
.status-discharged { color: #6c757d; }
.status-transferred { color: #0dcaf0; }
.status-deceased { color: #212529; }

/* Compact table */
.table-compact th,
.table-compact td {
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Dynamic form groups */
.field-group {
    border-left: 3px solid #0d6efd;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.field-group-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

/* ===== Landing Page ===== */

.landing-page {
    padding-top: 48px;
}

/* — Nav — */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 48px;
    display: flex;
    align-items: center;
    background: #161616;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
}

.landing-nav-brand img {
    filter: brightness(0) invert(1);
}

.landing-nav-link {
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    color: #c6c6c6;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

.landing-nav-link:hover {
    color: #fff;
}

/* — Hero — */
.landing-hero {
    background: #0f62fe;
    color: #fff;
    padding: 5rem 0;
}

.landing-hero-title {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: var(--fw-semibold);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.landing-hero-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
}

.landing-hero-link {
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 0.125rem;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s;
}

.landing-hero-link:hover {
    color: #fff;
    border-color: #fff;
}

@media (max-width: 991.98px) {
    .landing-hero { padding: 3rem 0; }
    .landing-hero-desc { margin-top: 2rem; }
}

/* — Eyebrow — */
.landing-eyebrow {
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* — CTA — */
.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    color: #161616;
    background: #fff;
    border: none;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    transition: background 0.15s;
}

.landing-cta:hover {
    background: #e8e8e8;
    color: #161616;
}

/* — Capabilities — */
.landing-capabilities {
    padding: 5rem 0;
    background: #f4f4f4;
}

.landing-section-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 3rem;
    max-width: 480px;
    color: #161616;
}

.landing-capabilities .landing-eyebrow {
    color: #0f62fe;
    opacity: 1;
}

.landing-tile-grid {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

.landing-tile {
    height: 100%;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-top: -1px;
    margin-left: -1px;
    transition: background 0.15s;
}

.landing-tile:hover {
    background: #e8e8e8;
}

.landing-tile-icon {
    font-size: 1.25rem;
    color: #0f62fe;
    display: block;
    margin-bottom: 1.5rem;
}

.landing-tile-title {
    font-size: 1rem;
    font-weight: var(--fw-semibold);
    color: #161616;
    margin-bottom: 0.5rem;
}

.landing-tile-desc {
    font-size: 0.875rem;
    color: #525252;
    line-height: 1.5;
    margin-bottom: 0;
}

/* — Band — */
.landing-band {
    padding: 5rem 0;
    background: #161616;
    color: #fff;
}

.landing-band-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.landing-band-desc {
    font-size: 1rem;
    color: #c6c6c6;
    line-height: 1.6;
    max-width: 520px;
    margin-bottom: 0;
}

/* — Footer — */
.landing-footer {
    background: #262626;
    padding: 1rem 0;
}

.landing-footer-copy {
    font-size: 0.75rem;
    color: #6f6f6f;
}

.brightness-invert {
    filter: brightness(0) invert(1);
}

.landing-peda-logo {
    opacity: 0.3;
    filter: brightness(0) invert(1);
    transition: opacity 0.15s;
}

.landing-peda-logo:hover {
    opacity: 0.6;
}
