@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-sans-3-latin-ext.woff2") format("woff2");
    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: "Source Sans 3";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-sans-3-latin.woff2") format("woff2");
    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;
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("fonts/source-serif-4-latin-ext.woff2") format("woff2");
    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: "Source Serif 4";
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("fonts/source-serif-4-latin.woff2") format("woff2");
    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 {
    color-scheme: light;
    --font-ui: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    --font-display: "Source Serif 4", Georgia, serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --surface-canvas: #ffffff;
    --surface-deep: #eef2f6;
    --surface-panel: #ffffff;
    --surface-raised: #ffffff;
    --surface-hover: #f2f6f8;
    --border-subtle: #e6eaf0;
    --border-default: #d9e0e8;
    --border-strong: #c6d0db;
    --text-primary: #17212f;
    --text-secondary: #455468;
    --text-muted: #718096;
    --accent: #0f766e;
    --accent-soft: #ecf8f6;
    --accent-border: #9fd3cd;
    --accent-blue: #2563eb;
    --status-success: #15803d;
    --status-warning: #a15c07;
    --status-danger: #c2414f;
    --status-info: #2563eb;
    --shadow-panel: 0 1px 2px rgba(15, 23, 42, .035), 0 7px 20px rgba(15, 23, 42, .04);
    --radius-panel: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface-canvas);
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    background: var(--surface-canvas);
    font-family: var(--font-ui);
    font-size: 16px;
    font-synthesis: none;
    font-variant-numeric: proportional-nums lining-nums;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent-blue);
}

button,
input,
select,
textarea {
    font: inherit;
    font-family: var(--font-ui);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

h1:focus {
    outline: none;
}

::selection {
    color: #ffffff;
    background: #0f766e;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f4f6f8;
}

::-webkit-scrollbar-thumb {
    border: 3px solid #f4f6f8;
    border-radius: 999px;
    background: #b9c4d0;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}

.page-heading__eyebrow {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .34rem;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.page-heading__eyebrow::before {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.page-heading h1 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    font-optical-sizing: auto;
    font-weight: 600;
    letter-spacing: -.012em;
    line-height: 1.12;
}

.page-heading p {
    max-width: 700px;
    margin: .45rem 0 0;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.6;
}

.page-heading__actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.last-sync {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: var(--text-muted);
    font-size: .75rem;
    white-space: nowrap;
}

.last-sync__pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-success);
}

.last-sync--warning {
    color: var(--status-warning);
}

.last-sync--warning .last-sync__pulse {
    background: var(--status-warning);
}

.panel {
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-panel);
    background: #ffffff;
    box-shadow: var(--shadow-panel);
}

.panel__header {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.panel__title {
    min-width: 0;
}

.panel__title h2,
.panel__title h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: -.005em;
}

.panel__title p {
    margin: .25rem 0 0;
    color: var(--text-muted);
    font-size: .75rem;
    line-height: 1.45;
}

.panel__body {
    padding: 1.2rem;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .56rem .85rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-secondary);
    background: #ffffff;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .03);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}

.button:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: #f8fafc;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .06);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.button--primary {
    border-color: #0f766e;
    color: #ffffff;
    background: #0f766e;
}

.button--primary:hover {
    border-color: #0b5f59;
    color: #ffffff;
    background: #0b5f59;
}

.button--danger {
    border-color: #efc4ca;
    color: #a73242;
    background: #fff7f8;
}

.button--ghost {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.segmented-control {
    display: inline-flex;
    gap: .16rem;
    padding: .2rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #f5f7fa;
}

.segmented-control button {
    min-width: 38px;
    padding: .4rem .55rem;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    font-size: .75rem;
    font-weight: 600;
}

.segmented-control button.active {
    color: var(--text-primary);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.form-control,
.form-select {
    min-height: 40px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-primary);
    background-color: #ffffff;
    font-size: .82rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    color: var(--text-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}

.form-control::placeholder {
    color: #98a5b5;
}

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-secondary);
    font-size: .8rem;
    font-variant-numeric: tabular-nums lining-nums;
}

.data-table th {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-muted);
    background: #fafbfc;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background .15s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.mono {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0;
}

.text-success { color: var(--status-success) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-danger { color: var(--status-danger) !important; }
.text-info { color: var(--status-info) !important; }
.text-muted { color: var(--text-muted) !important; }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--status-success);
}

.invalid {
    outline: 1px solid var(--status-danger);
}

.validation-message {
    color: #b42335;
}

.blazor-error-boundary {
    padding: 1rem;
    border: 1px solid #efc4ca;
    border-radius: 10px;
    color: #912b3a;
    background: #fff6f7;
}

.blazor-error-boundary::after {
    content: "Beklenmeyen bir hata oluştu.";
}

.darker-border-checkbox.form-check-input {
    border-color: var(--border-strong);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (max-width: 720px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .page-heading__actions {
        width: 100%;
    }

    .panel__header,
    .panel__body {
        padding-inline: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
