/* ===== TEMEL ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #f5f5f5;
}

h1, h2, h3 { margin: 0 0 1rem; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h1:focus { outline: none; }

a { color: #0057b7; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.layout-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #1e2130;
    color: #c9cdd6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #2e3347;
}

.app-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
}

.nav-list li a,
.nav-list li .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #c9cdd6;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.1s;
}

.nav-list li a:hover,
.nav-list li .nav-link:hover,
.nav-list li a.active,
.nav-list li .nav-link.active {
    background: #2e3347;
    color: #fff;
    text-decoration: none;
}

.nav-section {
    padding: 1rem 1rem 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666e82;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #2e3347;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sidebar-footer span { flex: 1; }

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

/* ===== FORMLAR ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: #444;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: #0057b7;
    box-shadow: 0 0 0 2px rgba(0, 87, 183, 0.15);
}

select.form-control { height: 2.25rem; }

textarea.form-control { resize: vertical; min-height: 80px; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; font-size: 0.8rem; }

/* ===== BUTONLAR ===== */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.btn-primary { background: #0057b7; color: #fff; }
.btn-primary:hover { background: #0046a0; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-secondary { background: #e8edf3; color: #333; }
.btn-secondary:hover { background: #d8dfe8; }

.btn-danger { background: #d92d20; color: #fff; }
.btn-danger:hover { background: #b42318; }

.btn-ghost { background: transparent; color: #0057b7; border: 1px solid #0057b7; }
.btn-ghost:hover { background: #eef4ff; }

/* ===== TABLOLAR ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.data-table th {
    background: #f8f9fb;
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

.data-table tr:hover td { background: #f8f9fb; }

.data-table .actions {
    display: flex;
    gap: 0.4rem;
}

/* ===== KARTLAR ===== */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f1f3;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ===== IZIN MATRISI ===== */
.permission-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.permission-matrix th {
    padding: 0.4rem 0.6rem;
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.75rem;
    color: #555;
}

.permission-matrix th.module-header { text-align: left; }

.permission-matrix td {
    padding: 0.35rem 0.6rem;
    border: 1px solid #f0f1f3;
    text-align: center;
}

.permission-matrix td.module-name {
    text-align: left;
    font-weight: 500;
    background: #fafafa;
}

.permission-matrix input[type=checkbox] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== YAN PANEL LAYOUT ===== */
.split-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.split-left {
    width: 260px;
    flex-shrink: 0;
}

.split-right {
    flex: 1;
    min-width: 0;
}

.list-item {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-bottom: 0.25rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.list-item:hover { border-color: #0057b7; }
.list-item.selected { background: #eef4ff; border-color: #0057b7; }
.list-item .list-item-title { font-weight: 500; }
.list-item .list-item-sub { font-size: 0.8rem; color: #777; }

/* Board drag-and-drop */
.board-card-ghost { opacity: 0.35; background: #dbeafe !important; border: 1px dashed #0057b7 !important; }
.board-card-drag  { box-shadow: 0 8px 24px rgba(0,0,0,0.15); transform: rotate(1.5deg); }

/* ===== ALERTS ===== */
.alert {
    padding: 0.65rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success { background: #ecfdf3; color: #027a48; border: 1px solid #a9efc5; }
.alert-error { background: #fff1f0; color: #b42318; border: 1px solid #fecdca; }
.alert-info { background: #eef4ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ===== LOGIN ===== */
.login-container {
    max-width: 380px;
    margin: 6rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-container .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.6rem;
}

.error-message {
    color: #b42318;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

/* ===== BLAZOR HATA BILDIRIM ===== */
#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.12);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after { content: "Bir hata olustu." }

/* ===== YARDIMCI ===== */
.text-muted { color: #777; }
.text-small { font-size: 0.8rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #e8edf3;
    color: #444;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* ===== COMMAND MENU ===== */
.command-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.command-dialog {
    width: min(620px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.command-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    outline: none;
}

.command-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 0.4rem;
}

.command-item {
    width: 100%;
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 0.25rem 0.75rem;
    align-items: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    text-align: left;
    cursor: pointer;
}

.command-item:hover {
    background: #eef4ff;
}

.command-kind {
    grid-row: span 2;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
}

.command-title {
    font-weight: 600;
    color: #111827;
}

.command-subtitle {
    font-size: 0.8rem;
    color: #777;
}

.command-empty {
    padding: 0.8rem;
    color: #777;
    font-size: 0.875rem;
}

/* ===== BİLDİRİMLER ===== */
.notif-bell {
    position: relative;
}

.notif-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #c9cdd6;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 4px;
}

.notif-btn:hover { color: #fff; }

.notif-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: #d92d20;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 899;
}

.notif-dropdown {
    position: fixed;
    bottom: 60px;
    left: 225px;
    width: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 900;
    max-height: 400px;
    overflow-y: auto;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f1f3;
    font-weight: 600;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    background: #fff;
}

.notif-item {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f0f1f3;
    cursor: pointer;
    font-size: 0.875rem;
}

.notif-item:hover { background: #f8f9fb; }
.notif-item-unread { background: #eef4ff; }
.notif-item:last-child { border-bottom: none; }

.notif-item-msg { color: #111827; line-height: 1.4; }

.notif-empty {
    padding: 1.5rem 1rem;
    color: #777;
    font-size: 0.875rem;
    text-align: center;
    margin: 0;
}
