:root {
    --bs-primary: #0284c7;
    --bs-primary-rgb: 2, 132, 199;
    --bs-primary-hover: #0369a1;
    --bs-primary-subtle: #f0f9ff;
    --bs-primary-border-subtle: #bae6fd;
    --bs-link-color: #0284c7;
    --bs-link-hover-color: #0369a1;
    --bw-body-bg: #f8fafc;
    --bw-card-border: #e2e8f0;
    --bw-text-main: #0f172a;
    --bw-text-muted: #64748b;
}

html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bw-body-bg) !important;
    color: var(--bw-text-main);
    letter-spacing: -0.01em;
}

a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color .15s ease;
}

a:hover {
    color: var(--bs-primary-hover);
}

.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all .18s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-primary-subtle {
    background-color: var(--bs-primary-subtle) !important;
    color: var(--bs-primary) !important;
}

.border-primary-subtle {
    border-color: var(--bs-primary-border-subtle) !important;
}

/* Modern Card Stili */
.card {
    background-color: #ffffff;
    border-radius: 16px !important;
    border: 1px solid var(--bw-card-border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04) !important;
    transition: box-shadow .2s ease, transform .2s ease;
}

/* Form Elemanları */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 0.85rem;
    font-size: 0.925rem;
    color: #1e293b;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* Tablolar */
.table {
    --bs-table-bg: transparent;
    color: #334155;
    vertical-align: middle;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 1rem;
    background: #f8fafc;
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background-color: rgba(2, 132, 199, 0.02);
}

/* Modern Badges */
.badge {
    border-radius: 50rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ===== Auth (Login / Register) Sayfaları ===== */
.bw-auth-page-wrapper {
    min-height: 100vh;
    background-color: #f1f5f9;
    background-image: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-card {
    max-width: 440px;
    margin: 2.5rem auto;
    width: 100%;
}

.auth-card.auth-card-wide {
    max-width: 560px;
}

.auth-card .card {
    border-radius: 1.25rem !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: hidden;
}

.auth-card .card-body {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.auth-card .card-header {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    padding: 1.5rem 1.25rem !important;
}

.auth-card .card-header h3,
.auth-card .card-header h4 {
    color: #ffffff !important;
    font-weight: 700;
}

.auth-card .card-header small {
    color: rgba(255, 255, 255, 0.95) !important;
}

.auth-card .form-label {
    color: #0f172a !important;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.auth-card .form-control {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.auth-card .form-control:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
}

.auth-card .input-group-text {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0284c7 !important;
}

.auth-card .form-check-label {
    color: #0f172a !important;
    font-weight: 500;
}

.auth-card .form-check-input {
    border: 2px solid #64748b !important;
    background-color: #ffffff !important;
}

.auth-card .form-check-input:checked {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
}

.auth-card a {
    color: #0284c7 !important;
    font-weight: 600;
}

.auth-card a:hover {
    color: #0369a1 !important;
    text-decoration: underline;
}

.auth-card small, .auth-card .text-muted {
    color: #475569 !important;
}

/* Blazor Hata Çubuğu */
#blazor-error-ui {
    color-scheme: light only;
    background: #fef08a;
    color: #854d0e;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.65rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 99999;
    font-size: 0.9rem;
    font-weight: 500;
}

#blazor-error-ui a.reload {
    color: #1e3a8a;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.55rem;
    font-size: 1.1rem;
    color: #713f12;
}


/* ==========================================================================
   Yüksek Kontrastlı Formlar, Checkbox ve Switch Elemanları
   ========================================================================== */

.form-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-check .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0;
    flex-shrink: 0;
}

.form-check-input {
    width: 1.3rem !important;
    height: 1.3rem !important;
    border: 2px solid #334155 !important;
    background-color: #ffffff !important;
    border-radius: 6px !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: all 0.15s ease-in-out;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.form-check-input:hover {
    border-color: #0284c7 !important;
    background-color: #f0f9ff !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.form-check-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.25) !important;
}

.form-check-input:checked {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M4 10l4 4 8-8'/%3e%3c/svg%3e") !important;
    background-size: 80% 80% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3) !important;
}

.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.5' fill='%23ffffff'/%3e%3c/svg%3e") !important;
}

.form-check-input:disabled {
    opacity: 0.75 !important;
    border: 2px solid #64748b !important;
    background-color: #e2e8f0 !important;
    cursor: not-allowed !important;
}

.form-check-input:disabled:checked {
    background-color: #64748b !important;
    border-color: #64748b !important;
}

.form-check.form-switch {
    padding-left: 0;
    gap: 0.75rem;
}

.form-switch .form-check-input {
    width: 2.75rem !important;
    height: 1.45rem !important;
    border: 2px solid #64748b !important;
    background-color: #cbd5e1 !important;
    border-radius: 2rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    background-position: left 2px center !important;
    background-size: contain !important;
    transition: background-position 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.form-switch .form-check-input:hover {
    border-color: #0284c7 !important;
}

.form-switch .form-check-input:checked {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    background-position: right 2px center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
}

.form-switch .form-check-input:disabled {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    opacity: 0.75 !important;
}

.form-check-label {
    color: #0f172a !important;
    font-weight: 500;
    font-size: 0.925rem;
    cursor: pointer;
    user-select: none;
    line-height: 1.35;
}

.form-label {
    color: #0f172a !important;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.card {
    background-color: #ffffff;
    border-radius: 16px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important;
    transition: box-shadow .2s ease, transform .2s ease;
}

.card-header {
    background-color: #f8fafc !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-weight: 600;
}

.table th {
    font-size: 0.785rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #0f172a !important;
    border-bottom: 2px solid #94a3b8 !important;
    padding: 0.85rem 1rem;
    background: #f1f5f9 !important;
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.table tbody tr:hover {
    background-color: #f1f5f9 !important;
}

.auth-card .form-check-input {
    border: 2px solid #64748b !important;
    background-color: #ffffff !important;
}

.auth-card .form-check-input:checked {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
}

.auth-card .form-check-label {
    color: #0f172a !important;
    font-weight: 500;
}


/* SITE-WIDE HIGH CONTRAST ENHANCEMENTS */
.text-dark {
    color: #0f172a !important;
}

.text-muted {
    color: #475569 !important;
}

.text-secondary {
    color: #475569 !important;
}

.hover-primary:hover {
    color: #0284c7 !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Blazor FocusOnNavigate baslik cercevesini kaldir */
h1:focus,
h1:focus-visible,
h2:focus,
h2:focus-visible,
h3:focus,
h3:focus-visible,
h4:focus,
h4:focus-visible,
[tabindex="-1"]:focus {
    outline: none !important;
    box-shadow: none !important;
}
