/* ==========================================================================
   haberci.website - Modern Executive Admin Theme
   ========================================================================== */

:root {
    --bw-sidebar-width: 265px;
    --bw-sidebar-collapsed-width: 72px;
    --bw-sidebar-bg: #090d16;
    --bw-sidebar-border: rgba(255, 255, 255, 0.07);
    --bw-sidebar-color: #94a3b8;
    --bw-sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --bw-sidebar-hover-color: #f8fafc;
    --bw-sidebar-active-bg: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    --bw-sidebar-active-color: #ffffff;
    --bw-sidebar-header-color: #64748b;
    --bw-topbar-height: 64px;
    --bw-content-bg: #f8fafc;
    --bw-transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Temel Gövde ===== */
.bw-admin-body {
    margin: 0;
    padding: 0;
    background-color: var(--bw-content-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

.bw-app-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ===== Modern Sidebar ===== */
.bw-sidebar {
    width: var(--bw-sidebar-width);
    min-width: var(--bw-sidebar-width);
    background-color: var(--bw-sidebar-bg);
    color: var(--bw-sidebar-color);
    border-right: 1px solid var(--bw-sidebar-border);
    transition: var(--bw-transition);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.bw-sidebar::-webkit-scrollbar {
    width: 5px;
}
.bw-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* Sidebar Durum Sınıfları */
.bw-app-wrapper.bw-sidebar-open .bw-sidebar {
    margin-left: 0;
}

.bw-app-wrapper.bw-sidebar-closed .bw-sidebar {
    margin-left: calc(-1 * var(--bw-sidebar-width));
}

/* Sidebar Marka (Brand) */
.bw-sidebar-brand {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--bw-sidebar-border);
    background: rgba(255, 255, 255, 0.02);
}

.bw-brand-link {
    color: #fff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.bw-brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    flex-shrink: 0;
}

.bw-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.bw-brand-sub {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Kullanıcı Kartı (Sidebar) */
.bw-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bw-sidebar-border);
    background: rgba(255, 255, 255, 0.015);
}

.bw-sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.bw-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border: 2px solid var(--bw-sidebar-bg);
    border-radius: 50%;
}

.bw-sidebar-user-info {
    flex-grow: 1;
    min-width: 0;
}

.bw-sidebar-user-name {
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.bw-sidebar-user-role .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
}

/* Menü Öğeleri */
.bw-sidebar-nav {
    padding: 0.85rem 0.75rem;
    flex-grow: 1;
}

.bw-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bw-nav-header {
    padding: 1rem 0.75rem 0.4rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--bw-sidebar-header-color);
    letter-spacing: 0.08em;
    font-weight: 700;
}

.bw-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    color: var(--bw-sidebar-color);
    text-decoration: none;
    transition: var(--bw-transition);
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    text-align: left;
}

.bw-nav-link i {
    font-size: 1.15rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.15s ease;
}

.bw-nav-link:hover {
    background-color: var(--bw-sidebar-hover-bg);
    color: var(--bw-sidebar-hover-color);
}

.bw-nav-link:hover i {
    transform: scale(1.1);
    opacity: 1;
}

.bw-nav-link.active {
    background: var(--bw-sidebar-active-bg);
    color: var(--bw-sidebar-active-color) !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.bw-nav-link.active i {
    opacity: 1;
}

/* Treeview Alt Menü */
.bw-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.75rem !important;
    opacity: 0.6;
}

.bw-has-treeview.bw-menu-open > .bw-nav-link .bw-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

.bw-treeview {
    list-style: none;
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 2px 0 2px 0.85rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bw-has-treeview.bw-menu-open > .bw-treeview {
    max-height: 2500px;
}

.bw-nav-link.bw-sub {
    padding: 0.45rem 0.75rem;
    font-size: 0.84rem;
    border-radius: 8px;
}

.bw-nav-link.bw-sub i {
    font-size: 0.95rem;
    width: 1rem;
}

/* ===== İçerik Alanı ===== */
.bw-content-area {
    flex-grow: 1;
    margin-left: var(--bw-sidebar-width);
    transition: var(--bw-transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    background-color: var(--bw-content-bg);
}

.bw-app-wrapper.bw-sidebar-open .bw-content-area {
    margin-left: var(--bw-sidebar-width);
}

.bw-app-wrapper.bw-sidebar-closed .bw-content-area {
    margin-left: 0;
}

/* Modern Topbar */
.bw-topbar {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    height: var(--bw-topbar-height);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.bw-sidebar-toggle {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 1.25rem;
    color: #475569;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--bw-transition);
}

.bw-sidebar-toggle:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.bw-user-pill-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    padding: 4px 14px 4px 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--bw-transition);
    cursor: pointer;
}

.bw-user-pill-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.navbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Sayfa Gövdesi */
.bw-page-content {
    padding: 1.75rem 2rem;
    flex-grow: 1;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .bw-page-content {
        padding: 1rem 0.85rem;
    }
}

/* Footer */
.bw-footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .bw-sidebar {
        margin-left: calc(-1 * var(--bw-sidebar-width));
    }
    .bw-content-area {
        margin-left: 0 !important;
    }
}

/* Hover Etkisi */
.hover-elevate {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-elevate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}


/* ==========================================================================
   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 #94a3b8 !important;
    background-color: #1e293b !important;
}

.auth-card .form-check-input:checked {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
}

.auth-card .form-check-label {
    color: #f1f5f9 !important;
}
