/* Fluent / Outlook tarzı shell — Segoe UI, nötr zemin, mavi vurgu */
:root {
  --orion-blue: #0078d4;
  --orion-blue-dark: #106ebe;
  --orion-blue-soft: rgba(0, 120, 212, 0.12);
  --orion-canvas: #faf9f8;
  --orion-surface: #ffffff;
  --orion-border: #edebe9;
  --orion-border-strong: #d2d0ce;
  --orion-text: #242424;
  --orion-text-secondary: #605e5c;
  --orion-rail-w: 48px;
  --orion-topbar-h: 48px;
  --orion-shadow-flyout: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.11);
  --orion-radius: 8px;
}

.orion-shell {
  font-family: "Segoe UI", "Segoe UI Web (West European)", system-ui, sans-serif;
  background: var(--orion-canvas);
  color: var(--orion-text);
  min-height: 100vh;
}

.orion-topbar {
  height: var(--orion-topbar-h);
  min-height: var(--orion-topbar-h);
  background: var(--orion-surface);
  border-color: var(--orion-border) !important;
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.04);
}

.orion-topbar .orion-brand {
  color: var(--orion-blue);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.orion-btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: var(--orion-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}

.orion-btn-icon:hover,
.orion-btn-icon.is-open {
  background: #f3f2f1;
}

.orion-search {
  max-width: 640px;
  margin: 0 auto;
  height: 32px;
  background: #f3f2f1;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  color: var(--orion-text-secondary);
}

.orion-search:focus-within {
  border-color: var(--orion-blue);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--orion-blue);
}

.orion-search input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--orion-text);
}

.orion-rail {
  width: var(--orion-rail-w);
  min-width: var(--orion-rail-w);
  background: #faf9f8;
  padding-top: 8px;
}

.orion-rail .orion-rail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 4px auto;
  border-radius: 4px;
  color: var(--orion-text);
  text-decoration: none;
}

.orion-rail .orion-rail-link:hover {
  background: #edebe9;
}

.orion-rail .orion-rail-link.active {
  background: var(--orion-blue-soft);
  color: var(--orion-blue);
  box-shadow: inset 3px 0 0 var(--orion-blue);
}

/* Outlook tarzı uygulama şeridi (modül / app rail) */
.orion-app-rail {
  width: var(--orion-rail-w);
  min-width: var(--orion-rail-w);
  background: #1b1a19;
  padding: 10px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
}

.orion-app-rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 48px;
  margin: 2px 0;
  border-radius: 4px;
  color: #c8c6c4;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.orion-app-rail-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.orion-app-rail-link.active {
  background: rgba(0, 120, 212, 0.28);
  color: #fff;
}

.orion-app-rail-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #2899f5;
}

.orion-app-rail-label {
  display: block;
  margin-top: 2px;
  max-width: 44px;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  opacity: 0.9;
}

.orion-module-sidebar-head .orion-module-app-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--orion-text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.orion-main {
  background: var(--orion-canvas);
}

.orion-panel {
  background: var(--orion-surface);
  border: 1px solid var(--orion-border);
  border-radius: var(--orion-radius);
}

.orion-pill-user {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orion-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

body.orion-body {
  margin-bottom: 0;
}

/* —— M365 waffle flyout —— */
.orion-launcher-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: transparent;
}

.orion-launcher-flyout {
  position: fixed;
  top: calc(var(--orion-topbar-h) + 4px);
  left: 8px;
  z-index: 1050;
  width: min(360px, calc(100vw - 16px));
}

.orion-launcher-panel {
  background: var(--orion-surface);
  border-radius: var(--orion-radius);
  box-shadow: var(--orion-shadow-flyout);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px;
  overflow: hidden;
}

.orion-launcher-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  margin-bottom: 12px;
  background: #f3f2f1;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--orion-text-secondary);
}

.orion-launcher-search:focus-within {
  background: #fff;
  border-color: var(--orion-blue);
}

.orion-launcher-search input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 14px;
  color: var(--orion-text);
  font-family: inherit;
}

.orion-launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 2px;
  padding: 4px 0 8px;
  max-height: min(52vh, 360px);
  overflow-y: auto;
}

@media (min-width: 420px) {
  .orion-launcher-flyout {
    width: 392px;
  }
  .orion-launcher-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.orion-launcher-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--orion-text);
  transition: background 0.12s ease;
}

.orion-launcher-app:hover {
  background: #f3f2f1;
  color: var(--orion-text);
}

.orion-launcher-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--app-accent, #0078d4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  color: #fff;
}

.orion-launcher-icon .bi {
  font-size: 1.15rem;
  line-height: 1;
  color: #fff;
}

.orion-launcher-glyph {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.orion-launcher-label {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orion-launcher-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--orion-text-secondary);
  font-size: 13px;
  padding: 1.5rem 0.5rem;
}

.orion-launcher-footer {
  border-top: 1px solid var(--orion-border);
  padding-top: 10px;
  margin-top: 4px;
}

.orion-launcher-footer-label {
  font-size: 12px;
  color: var(--orion-text-secondary);
  padding: 0 4px;
}

/* Modül yan menüsü */
.orion-module-sidebar {
  width: 268px;
  min-width: 268px;
  overflow-y: auto;
  border-color: var(--orion-border) !important;
  background: var(--orion-surface) !important;
}

.orion-letter-spacing-sm {
  letter-spacing: 0.08em;
  font-size: 11px;
}

.orion-module-group {
  transition: background 0.15s ease;
}

.orion-module-group:hover {
  background: #f5f5f5 !important;
}

.orion-module-group[aria-expanded="true"] {
  background: #f3f2f1 !important;
}

.orion-chevron {
  transition: transform 0.2s ease;
}

.orion-module-badge {
  background: var(--orion-blue-soft) !important;
  color: var(--orion-blue);
  font-size: 11px;
  font-weight: 600;
}

.orion-module-tree {
  border-left: 1px solid var(--orion-border);
  margin-left: 0.65rem;
}

.orion-module-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem 0.4rem 0.75rem;
  margin-bottom: 1px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--orion-text);
  text-decoration: none;
}

.orion-module-link i {
  font-size: 0.95rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.orion-qa-link {
  font-weight: 500;
}

.orion-quick-access {
  border-bottom: 1px solid var(--orion-border);
  margin-bottom: 0.35rem;
}

.orion-app-rail-link i {
  font-size: 1.25rem;
  line-height: 1;
}

.orion-module-link:hover {
  background: #f3f2f1;
}

.orion-module-link.active {
  background: var(--orion-blue-soft);
  color: var(--orion-blue);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--orion-blue);
}

.orion-module-group[aria-expanded="false"] .orion-chevron {
  transform: rotate(-90deg);
}

.orion-hover-tile {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a:hover .orion-hover-tile {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-color: #d2d0ce !important;
}

.orion-topbar.orion-toolbar-sinav {
  background: #fff !important;
  border-bottom: 1px solid var(--orion-border) !important;
}

.orion-topbar.orion-toolbar-sinav .orion-brand {
  color: #0e700e;
}

.orion-topbar.orion-toolbar-sinav .orion-search {
  background: #f3f2f1;
}

.orion-topbar.orion-toolbar-sistem {
  background: #fff !important;
  border-bottom: 1px solid var(--orion-border) !important;
}

.orion-topbar.orion-toolbar-sistem .orion-brand {
  color: #004578;
}

.orion-topbar.orion-toolbar-sistem .orion-search {
  background: #f3f2f1;
}

.orion-topbar.orion-toolbar-alert {
  background: #fff !important;
  border-bottom: 2px solid #d13438 !important;
}

.orion-topbar.orion-toolbar-alert .orion-brand {
  color: #a4262c;
}

.orion-busy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
}

.orion-busy-overlay.orion-busy-visible {
  display: flex;
}

.orion-busy-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--orion-border);
  border-top-color: var(--orion-blue);
  animation: orion-spin 0.75s linear infinite;
}

@keyframes orion-spin {
  to {
    transform: rotate(360deg);
  }
}

.orion-table-compact td,
.orion-table-compact th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.875rem;
}

.orion-row-highlight.bg-light {
  --bs-bg-opacity: 0.65;
}

/* Dönem / dil seçicileri topbar içinde Fluent */
#orion-period-select-host .form-select,
#orion-locale-select .form-select {
  border-radius: 4px;
  border-color: var(--orion-border);
  font-size: 13px;
  min-height: 32px;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  background-color: #f3f2f1;
}

#orion-period-select-host .form-select:focus,
#orion-locale-select .form-select:focus {
  border-color: var(--orion-blue);
  box-shadow: 0 0 0 1px var(--orion-blue);
}
