/* Lexcincia — lacivert + altın kurumsal tema. Renkler EnoraTheme.cs ve logo ile uyumludur. */
:root {
    --enora-navy: #1B2D5B;
    --enora-navy-deep: #0B1A3A;
    --enora-gold: #C9A55A;
    --enora-gold-light: #EBD29A;
    --enora-gold-deep: #9C7A33;
    --enora-rose: #C99A85;
    --enora-ink: #1A2238;
    --enora-muted: #5C6478;
    --enora-line: #E6E1D6;
    --enora-bg: #F7F5F0;
    --enora-radius: 10px;
}

html, body { background: var(--enora-bg); color: var(--enora-ink); }
h1:focus { outline: none; }

/* Uygulama çubuğu ve marka */
.enora-appbar { border-bottom: 1px solid var(--enora-line); }
.enora-appbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, var(--enora-gold), var(--enora-rose) 45%, transparent 85%); opacity: .55;
}
.mud-drawer { background: linear-gradient(180deg, #10224A 0%, #0B1A3A 55%, #08132D 100%) !important; }
.enora-appbar-title { font-weight: 600; color: var(--enora-ink); }

.enora-brand { display: flex; align-items: center; gap: 12px; padding: 22px 18px 18px; margin: 0 10px 6px; border-bottom: 1px solid rgba(201,165,90,.22); }
.enora-brand-logo { width: 60px; height: auto; flex: none; }
.enora-brand-mark {
    width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, #2F7D7A, #1B2D5B); color: #fff; font-weight: 700; font-size: 18px;
}
.enora-brand-name {
    font-family: "Cinzel", "Times New Roman", serif; font-weight: 600; font-size: 19px; line-height: 1.1; letter-spacing: .06em;
    color: #E3BF7A; background: linear-gradient(90deg, #EBC77F, #D9A764 55%, #D6AE9C); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.enora-brand-sub { font-size: 10px; color: #CFA08B; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.enora-brand--dark .enora-brand-name { color: var(--enora-ink); }
.enora-brand--dark .enora-brand-sub { color: var(--enora-muted); }
.enora-brand--dark { padding: 0 0 28px; }

/* Yan menü */
.enora-nav { padding: 4px 10px; }
.enora-nav-section { display: block; padding: 18px 12px 6px; color: #8E98B3 !important; font-size: 11px !important; letter-spacing: .08em; }
.enora-nav .mud-nav-link { border-radius: 8px; margin: 2px 0; color: #D9DEEA; }
.enora-nav .mud-nav-link:hover { background: rgba(201,165,90,.08); }
.enora-nav .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(201,165,90,.22), rgba(201,165,90,.05)); color: #F3DEB0; font-weight: 500;
    box-shadow: inset 3px 0 0 var(--enora-gold);
}
.enora-nav .mud-nav-link.active .mud-nav-link-icon { color: var(--enora-gold-light); }

/* Kullanıcı menüsü */
.enora-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 0; background: none; font: inherit; color: inherit; text-align: left; border-radius: 8px; cursor: pointer; }
.enora-user:hover { background: #F2EEE5; }
.enora-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.enora-user-name { font-size: 14px; font-weight: 600; color: var(--enora-ink); }
.enora-user-role { font-size: 12px; color: var(--enora-muted); }
.enora-logout-form { margin: 0; }
.enora-logout-button {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; border: 0; background: none;
    font: inherit; font-size: 14px; color: var(--enora-ink); cursor: pointer; text-align: left;
}
.enora-logout-button:hover { background: rgba(0,0,0,.04); }

/* Sayfa başlığı ve kartlar */
.enora-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.enora-page-title { color: var(--enora-ink); }
.enora-page-actions { display: flex; gap: 8px; }

.enora-card { border: 1px solid var(--enora-line); border-radius: var(--enora-radius) !important; padding: 20px; background: #fff; }
.enora-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.enora-stat { display: flex; align-items: center; gap: 16px; height: 100%; }
.enora-stat-icon {
    width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; flex: none;
    color: var(--stat-color); background: color-mix(in srgb, var(--stat-color) 12%, white);
}
.enora-stat-label { font-size: 13px; color: var(--enora-muted); }
.enora-stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--enora-ink); }
.enora-stat-hint { font-size: 12px; color: var(--enora-muted); margin-top: 2px; }

/* Tablo ve araç çubuğu */
.enora-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.enora-toolbar .mud-input-control { margin-top: 0; }
.enora-nowrap { white-space: nowrap; }
.enora-subtitle { color: var(--enora-muted); }
.enora-search { max-width: 360px; }
.enora-filter { max-width: 180px; }
.enora-table .mud-table-head .mud-table-cell { font-size: 12px; font-weight: 600; color: var(--enora-muted); text-transform: uppercase; letter-spacing: .04em; }
.enora-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; background: #F2EEE5; padding: 2px 6px; border-radius: 5px; }
.enora-muted { color: var(--enora-muted); font-size: 13px; }

.enora-dl { display: grid; grid-template-columns: 140px 1fr; row-gap: 12px; margin: 0; }
.enora-dl dt { color: var(--enora-muted); font-size: 14px; }
.enora-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.enora-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 16px; }

/* Giriş ekranı (statik SSR; MudBlazor girişleri yerine yerel form elemanları) */
.enora-auth {
    min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
    background:
        radial-gradient(900px 520px at 12% -5%, rgba(46,78,160,.50) 0%, transparent 60%),
        radial-gradient(700px 480px at 105% 105%, rgba(201,165,90,.10) 0%, transparent 60%),
        linear-gradient(160deg, #10224A 0%, #0B1A3A 55%, #07112A 100%);
}
.enora-auth-shell { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }
.enora-auth-logo { width: 100%; max-width: 340px; height: auto; margin-bottom: 22px; }
.enora-auth-panel {
    width: 100%; background: #fff; border: 1px solid rgba(201,165,90,.35); border-top: 3px solid var(--enora-gold);
    border-radius: 14px; padding: 32px; box-shadow: 0 24px 60px rgba(3,10,30,.45);
}
.enora-auth-badge {
    display: inline-block; margin-bottom: 14px; padding: 3px 10px; border: 1px solid rgba(201,165,90,.55); border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--enora-gold-deep);
}
.enora-auth-title { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.enora-auth-sub { font-size: 14px; color: var(--enora-muted); margin: 0 0 24px; }
.enora-form { display: flex; flex-direction: column; gap: 16px; }
.enora-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--enora-ink); }
.enora-field input {
    height: 42px; padding: 0 12px; border: 1px solid #CBD3DD; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 400;
    color: var(--enora-ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.enora-field input:focus { outline: none; border-color: var(--enora-gold-deep); box-shadow: 0 0 0 3px rgba(201,165,90,.25); }
.enora-field input.invalid { border-color: #C53030; }
.enora-field-error, .validation-message { color: #C53030; font-size: 12px; font-weight: 400; }
.enora-submit {
    height: 44px; margin-top: 4px; border: 1px solid var(--enora-navy-deep); border-radius: 8px;
    background: linear-gradient(180deg, #213670, var(--enora-navy-deep)); color: #F3DEB0; letter-spacing: .02em;
    font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.enora-submit:hover { background: var(--enora-navy-deep); color: #fff; box-shadow: 0 0 0 3px rgba(201,165,90,.25); }
.enora-alert { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.enora-alert--error { background: #FDECEC; color: #9B2C2C; border: 1px solid #F5C2C2; }
.enora-alert--info { background: #EAF1FB; color: #1E4E8C; border: 1px solid #C9DBF3; }

/* Blazor hata alanı */
#blazor-error-ui {
    background: #FFF7E0; border-top: 1px solid #F2D27A; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.1);
    display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 2000; font-size: 14px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #B32121; padding: 1rem; color: #fff; border-radius: 8px; }
.blazor-error-boundary::after { content: "Bu bölüm yüklenirken bir hata oluştu."; }


/* Durum gösterimleri (yükleniyor / boş) */
.enora-state { display: flex; align-items: center; gap: 12px; padding: 24px 20px; }
.enora-state--empty { flex-wrap: wrap; color: var(--enora-muted); }
.enora-state--empty > .mud-icon-root { font-size: 32px; opacity: .6; }
.enora-state-title { font-weight: 600; color: var(--enora-ink); }
.enora-section-title { display: block; color: var(--enora-muted) !important; letter-spacing: .08em; margin: 4px 0 8px; }

/* Kart varyantları */
.enora-card--flush { padding: 0; overflow: hidden; }
.enora-card--tabs { padding: 0; overflow: hidden; }
.enora-card--tabs .mud-tabs-tabbar { border-bottom: 1px solid var(--enora-line); }
.enora-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 16px; }
.enora-panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* Izgaralar ve hücreler */
.enora-grid { border: 0; }
.enora-grid .mud-table-head .mud-table-cell { font-size: 12px; font-weight: 600; color: var(--enora-muted); text-transform: uppercase; letter-spacing: .04em; }
.enora-actions-cell { white-space: nowrap; text-align: right; }
.enora-scroll-x { overflow-x: auto; }
.enora-url { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.enora-link { color: var(--enora-navy); text-decoration: none; }
.enora-link:hover { text-decoration: underline; }
.enora-secret { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; letter-spacing: .04em; }
.enora-chip { font-weight: 500; }
.enora-small { font-size: 12px; }
.enora-error-text { color: #9B2C2C; font-size: 13px; }

/* Filtreler */
.enora-picker-wrap { min-width: 260px; max-width: 360px; flex: 1 1 260px; }
.enora-picker { width: 100%; }
.enora-filter-wide { max-width: 260px; }
.enora-date-range { max-width: 300px; }

/* Tanım listesi ve form ızgarası */
.enora-dl--cols { grid-template-columns: 160px 1fr 160px 1fr; column-gap: 24px; }
.enora-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.enora-form-grid > .enora-span-2 { grid-column: 1 / -1; }

@media (max-width: 960px) {
    .enora-dl--cols { grid-template-columns: 140px 1fr; }
}

@media (max-width: 600px) {
    .enora-form-grid { grid-template-columns: 1fr; }
    .enora-picker-wrap, .enora-search, .enora-filter, .enora-filter-wide, .enora-date-range { max-width: none; flex: 1 1 100%; }
    .enora-page-actions { width: 100%; }
    .enora-user-text { display: none; }
    .enora-auth-panel { padding: 28px 20px; }
    .enora-auth-logo { max-width: 260px; margin-bottom: 16px; }
    .enora-dl { grid-template-columns: 1fr; row-gap: 2px; }
    .enora-dl dd { margin-bottom: 10px; }
}

/* Araç çubuğundaki filtreler sabit genişlikte kalır (MudSelect sınıfı iç elemana uygulandığından .mud-select sarmalayıcısı da sınırlanır). */
.enora-toolbar > .enora-search { flex: 1 1 260px; }
.enora-toolbar > .mud-select { flex: 0 0 auto; }
.enora-toolbar > .mud-select:has(.enora-filter), .enora-toolbar > .enora-filter { width: 180px; }
.enora-toolbar > .mud-select:has(.enora-filter-wide), .enora-toolbar > .enora-filter-wide { width: 240px; }
.enora-toolbar > .enora-date-range { flex: 0 0 280px; width: 280px; }
.enora-toolbar .enora-filter, .enora-toolbar .enora-filter-wide { max-width: none; }
@media (max-width: 600px) {
    .enora-toolbar > .mud-select, .enora-toolbar > .enora-date-range { flex: 1 1 100%; width: auto !important; }
}

/* AI Studio widget script (salt okunur metin; HTML olarak yorumlanmaz) */
.enora-script { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; background: #F2EEE5; padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; margin: 0; max-height: 160px; overflow: auto; }
