html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Yazı boyutu ölçeği (DevExpress temaları rem tabanlı olduğu için hepsini ölçekler) */
html.wm-fs-kucuk { font-size: 12.5px; }
html.wm-fs-normal { font-size: 14px; }
html.wm-fs-buyuk { font-size: 16px; }

.page {
    display: flex;
    min-height: 100vh;
}

/* Koyu lacivert kenar çubuğu (Lisans Yönetim Sistemi görünümü) */
.sidebar {
    width: 250px;
    flex-shrink: 0; /* geniş içerik kenar çubuğunu ezmesin */
    background: #131b30;
    color: #d1d5db;
    border-right: 1px solid #0d1322;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .2s ease;
    display: flex;
    flex-direction: column;
}

/* Marka + daraltma butonu */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 3.5rem;
    padding: 0 14px;
    border-bottom: 1px solid #1e2942;
    position: sticky;
    top: 0;
    background: #131b30;
    z-index: 2;
}
.sidebar-brand .brand-text {
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    letter-spacing: .5px;
    white-space: nowrap;
}
.sidebar-toggle {
    border: none;
    background: transparent;
    color: #8a93ad;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    line-height: 1;
}
.sidebar-toggle:hover { background: #1e2942; color: #fff; }

/* Daraltılmış durum: yalnızca ikonlar */
.sidebar-collapsed .sidebar { width: 60px; }
.sidebar-collapsed .brand-text { display: none; }

/* Menü: katlanabilir bölüm başlıkları + DevExpress TreeView öğeleri */
.wm-treenav { padding: 8px 8px 24px; }
.wm-grp {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #6b7690;
    white-space: nowrap;
}
.wm-tree .dxbl-treeview-item-text { white-space: nowrap; }
.wm-mi { display: inline-block; width: 24px; text-align: center; margin-right: 6px; font-size: .95rem; }
.wm-mi-t { font-size: 13.5px; }

/* Bölüm düğümleri: başlık görünümü — seçim/hover boyaması yok, ok gri */
.wm-tree .wm-grp-node > .dxbl-treeview-item-container .dxbl-treeview-item-content,
.wm-tree .wm-grp-node > .dxbl-treeview-item-container:hover .dxbl-treeview-item-content {
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 10px;
    padding-bottom: 2px;
}
.wm-tree .wm-grp-node > .dxbl-treeview-item-container::before { background: transparent !important; }
.wm-tree .dxbl-treeview-tmpl .dxbl-image,
.wm-tree .dxbl-treeview-expand-btn,
.wm-tree .dxbl-btn { color: #6b7690; }
.wm-tree .dxbl-treeview-expand-btn:hover { color: #fff; }

/* TreeView öğelerini koyu temaya uyarla */
.wm-tree .dxbl-treeview-item-container,
.wm-tree .dxbl-treeview-item { background: transparent; }
.wm-tree .dxbl-treeview-item-content { color: #cdd4e4; border-radius: 8px; padding-top: 6px; padding-bottom: 6px; }
.wm-tree .dxbl-treeview-item-container:hover .dxbl-treeview-item-content { background: #1e2942; color: #fff; }
.wm-tree .dxbl-treeview-item-container.dxbl-treeview-item-selected .dxbl-treeview-item-content,
.wm-tree .dxbl-active .dxbl-treeview-item-content {
    background: #26335a;
    color: #fff;
    box-shadow: inset 3px 0 0 #4f7cff;
    font-weight: 600;
}
/* Temanın seçim/odak vurgusu ::before katmanıyla turuncu boyar — koyu maviye çevir */
.wm-tree .dxbl-treeview-item-container.dxbl-active::before { background: #26335a !important; border-radius: 8px; }
.wm-tree .dxbl-treeview-item-container:hover::before { background: #1e2942 !important; border-radius: 8px; }

/* Daraltılmış: yalnız ikonlar görünür, bölüm başlıkları gizlenir */
.sidebar-collapsed .wm-treenav { padding: 6px 4px; }
.sidebar-collapsed .wm-grp { visibility: hidden; }
.sidebar-collapsed .wm-mi-t { display: none; }

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a2e;
}

.content {
    padding-top: 1.5rem;
    flex: 1;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.15);
    color: white;
}

/* ─── Gruplu navigasyon (LisansBlazor tarzı: bölüm başlıkları + küçük ikonlar) ─── */
.wm-nav {
    padding: 0 0 1rem;
}

.wm-nav-section {
    margin-bottom: 1.1rem;
}

.wm-nav-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.4);
    padding: 0 16px 6px;
    text-transform: uppercase;
}

.wm-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    height: auto;
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.wm-nav-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: #fff;
}

.wm-nav-link.active {
    background-color: rgba(99,102,241,0.25);
    color: #fff;
    border-left-color: #6366f1;
}

.wm-nav-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    opacity: 0.9;
    flex-shrink: 0;
}

.login-container {
    max-width: 420px;
    margin: 80px auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.login-form .form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.login-form .form-control,
.login-form .form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.login-form .btn-primary {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.login-form .btn-primary:hover {
    background: #16213e;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.module-card {
    min-height: 180px;
}

.office-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.admin-header {
    margin-bottom: 1rem;
}

.admin-stats {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: #e8eef7;
    border-radius: 6px;
    color: #1a1a2e;
    font-weight: 600;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.admin-tabs button {
    border: 1px solid #ced4da;
    background: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
}

.admin-tabs button.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

.admin-panel {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.admin-form-grid label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.admin-table th {
    background: #f8f9fa;
}

.role-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.btn-link {
    background: none;
    border: none;
    color: #0d6efd;
    cursor: pointer;
    padding: 0;
    margin-right: 0.75rem;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.btn-primary {
    background: #1a1a2e;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

/* ─── Görsel Ayarlar paneli (AdminLTE tarzı kontrol çubuğu) ─── */
.wm-settings-fab {
    position: fixed; right: 0; top: 42%; z-index: 1050;
    width: 38px; height: 44px; border: none; cursor: pointer;
    background: #1a56db; color: #fff; border-radius: 8px 0 0 8px;
    box-shadow: -2px 2px 8px rgba(0,0,0,.2); font-size: 1.1rem;
}
.wm-settings-fab:hover { background: #1241ab; }
.wm-settings-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 1055; }
.wm-settings-panel {
    position: fixed; right: 0; top: 0; bottom: 0; width: 320px; max-width: 90vw; z-index: 1060;
    background: #fff; box-shadow: -4px 0 18px rgba(0,0,0,.18); display: flex; flex-direction: column;
    animation: wm-slide-in .18s ease;
}
@keyframes wm-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.wm-settings-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-weight: 700; color: #1f2937;
}
.wm-settings-body { padding: 12px 16px; overflow-y: auto; }
.wm-settings-section { padding: 10px 0; border-bottom: 1px dashed #eef0f3; }
.wm-settings-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; margin-bottom: 8px; }
.wm-settings-hint { font-size: 11px; color: #9ca3af; margin-top: 6px; }
.wm-theme-list { display: flex; flex-direction: column; gap: 4px; }
.wm-theme-item {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px;
}
.wm-theme-item:hover { background: #f8fafc; }
.wm-theme-item.active { border-color: #1a56db; box-shadow: 0 0 0 2px rgba(26,86,219,.12); }
.wm-theme-swatch { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); }
.wm-theme-check { margin-left: auto; color: #1a56db; }
.wm-seg { display: flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
.wm-seg-btn { flex: 1; border: none; background: #fff; padding: 7px 6px; cursor: pointer; font-size: 12.5px; color: #374151; border-right: 1px solid #e5e7eb; }
.wm-seg-btn:last-child { border-right: none; }
.wm-seg-btn.active { background: #1a56db; color: #fff; }
