* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", Inter, Arial, Helvetica, sans-serif;
  background: #eef3f9;
  color: #14213d;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
}

.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

/* ——— Sol menü v5 (hibrit ikon rail ~64px + dock flyout) ——— */
.sidebar.sidebar--v2 {
  --ybp-rail-w: 64px;
  --ybp-fly-w: 280px;
  width: var(--ybp-rail-w);
  min-width: var(--ybp-rail-w);
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #e2e8f0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 120;
}

.sidebar.sidebar--v2 .sidebar-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar.sidebar--v2 .sidebar-inner::-webkit-scrollbar {
  width: 4px;
}

.sidebar.sidebar--v2 .sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.brand-block--v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.brand-block--v2 .brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.brand-mark-yp {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2563eb, #0ea5e9);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.brand-mark-icon {
  display: none;
}

.brand-block--v2 .brand-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  color: #fff;
}

.brand-block--v2 .brand-subtitle {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.nav-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  width: 100%;
}

.nav-rail-footer {
  margin-top: auto;
  padding-top: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-rail-item,
.nav-rail-group > .nav-rail-item,
button.nav-rail-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-left: 0;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.nav-rail-item > span:not(.nav-rail-badge) {
  /* Metin a11y için kalır; görünür tooltip body’de .nav-rail-tip (overflow kesmesin) */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-rail-tip {
  position: fixed;
  z-index: 3000;
  transform: translateY(-50%);
  background: #0f172a;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  transition: opacity 0.12s ease;
}

.nav-rail-tip.on {
  opacity: 1;
  visibility: visible;
}

.nav-rail-tip::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #0f172a;
}

.nav-rail-icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2;
}

.nav-rail-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-rail-item.is-active,
.nav-rail-group.is-open > .nav-rail-item {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.nav-rail-item.is-active .nav-rail-icon,
.nav-rail-group.is-open > .nav-rail-item .nav-rail-icon {
  color: #fff;
}

.nav-rail-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  width: 7px;
  height: 7px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #fb923c, #e85d1a);
  color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0f172a;
}

.nav-rail-item.is-active .nav-rail-badge,
.nav-rail-group.is-open > .nav-rail-item .nav-rail-badge {
  background: #fdba74;
  box-shadow: 0 0 0 2px #1d4ed8;
}

.nav-flyout-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  margin: 6px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.nav-flyout-hint strong {
  color: #475569;
  font-weight: 700;
}

.nav-rail-item--logout:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
}

.nav-rail-group {
  position: relative;
  width: 100%;
}

.nav-flyout {
  display: none;
  position: fixed;
  left: var(--ybp-rail-w, 64px);
  top: 0;
  bottom: 0;
  width: var(--ybp-fly-w, 280px);
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: hidden;
  flex-direction: column;
  background: #ffffff;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.08);
  padding: 0;
  z-index: 1100;
}

.nav-rail-group.is-open .nav-flyout {
  display: flex;
}

/* Flyout acikken yalnizca o ikon mavi — sayfa aktif ikonu karismasin */
body.nav-flyout-docked-open .nav-rail > a.nav-rail-item.is-active,
body.nav-flyout-docked-open .nav-rail-group:not(.is-open) > .nav-rail-item.is-active {
  background: transparent;
  color: #94a3b8;
  box-shadow: none;
}

body.nav-flyout-docked-open .nav-rail > a.nav-rail-item.is-active:hover,
body.nav-flyout-docked-open .nav-rail-group:not(.is-open) > .nav-rail-item.is-active:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-flyout-head {
  flex-shrink: 0;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.nav-flyout-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.nav-flyout-pin-label {
  width: 100%;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 2px;
}

.nav-flyout-pin {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  line-height: 1.2;
}

.nav-flyout-pin:hover {
  background: #dbeafe;
  color: #1e40af;
}

.nav-flyout-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-flyout-head h2 i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  display: inline-block;
  flex-shrink: 0;
}

body.nav-flyout-docked-open .content-area {
  margin-left: var(--ybp-fly-w, 280px);
  transition: margin-left 0.2s ease;
}

.content-area {
  transition: margin-left 0.2s ease;
}

.nav-flyout-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 20px;
  scrollbar-gutter: stable;
  /* Kritik: yuksek panelde satirlar arasina bosluk sikistirma */
  align-content: flex-start;
}

.nav-flyout-grid::-webkit-scrollbar {
  width: 8px;
}

.nav-flyout-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid #fff;
}

.nav-flyout-grid--single {
  grid-template-columns: 1fr;
}

.nav-flyout-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  align-self: stretch;
}

.nav-flyout-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.nav-flyout-col-title .nav-rail-icon {
  display: none;
}

.nav-flyout-col > .nav-flyout-col-title[style] {
  margin-top: 10px !important;
}

.nav-flyout-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nav-flyout-link-icon {
  display: none;
}

.nav-flyout-link:hover {
  background: #f8fafc;
  color: #2563eb;
}

.nav-flyout-link.active {
  background: linear-gradient(90deg, #eff6ff, #f0f9ff);
  color: #1d4ed8;
  font-weight: 700;
  border-color: #bfdbfe;
}

.nav-flyout-link.active .nav-flyout-link-icon {
  color: #2563eb;
}

.nav-flyout-badge {
  margin-left: auto;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}
.nav-flyout-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1040;
  touch-action: none;
}

.nav-flyout-backdrop.is-visible {
  display: block;
}

.nav-flyout.nav-flyout--sheet {
  z-index: 1050;
}

body.nav-mobile-menu-open {
  overflow: hidden;
}

/* Eski koyu sidebar (layout-guest vb. için) */
.sidebar:not(.sidebar--v2) {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, #05203a 0%, #03172c 100%);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar:not(.sidebar--v2) .sidebar-inner {
  height: 100%;
  overflow-y: auto;
  padding: 28px 18px;
}

.brand-block:not(.brand-block--v2) {
  margin-bottom: 28px;
}

.brand-block:not(.brand-block--v2) .brand-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #fff;
}

.brand-block:not(.brand-block--v2) .brand-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav > a,
.sidebar-nav-link,
.menu-toggle,
.submenu a {
  display: flex;
  align-items: center;
  width: 100%;
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.sidebar-nav > a:hover,
.sidebar-nav-link:hover,
.sidebar-nav > a.active,
.sidebar-nav-link.active,
.menu-toggle:hover,
.menu-group.open > .menu-toggle,
.submenu a:hover,
.submenu a.active {
  background: rgba(255,255,255,0.12);
}

.sidebar-nav > a.active,
.sidebar-nav-link.active,
.submenu a.active {
  font-weight: 700;
}

.sidebar-nav-link {
  gap: 10px;
}

.sidebar-nav-icon {
  width: 22px;
  flex-shrink: 0;
  opacity: 0.75;
  font-size: 13px;
  text-align: center;
}

.sidebar-nav-link.active .sidebar-nav-icon {
  opacity: 1;
}

.menu-group-primary > .menu-toggle {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.menu-group-primary.open > .menu-toggle {
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle-label {
  flex: 1;
  text-align: left;
}

.submenu-sectioned {
  gap: 2px;
}

.submenu-section-label {
  margin: 10px 14px 4px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
}

.submenu-section-label:first-child {
  margin-top: 4px;
}

.submenu a.submenu-shortcut {
  font-size: 13px;
  padding-left: 18px;
  opacity: 0.92;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px 14px 14px 10px;
}

.submenu a.submenu-shortcut.active {
  border-left-color: rgba(255, 255, 255, 0.55);
}

.menu-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  flex-shrink: 0;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-toggle {
  justify-content: space-between;
}

.menu-arrow {
  font-size: 14px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.menu-group.open .menu-arrow {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding-left: 10px;
}

.menu-group.open .submenu {
  display: flex;
}

.submenu a {
  font-size: 14px;
  padding: 11px 14px;
  color: rgba(255,255,255,0.92);
}

.reports-submenu {
  gap: 4px;
}

.menu-group-nested {
  gap: 4px;
}

.menu-group-nested .menu-toggle-nested {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.88);
}

.menu-group-nested .submenu-nested {
  padding-left: 6px;
  gap: 4px;
}

.menu-group-nested .submenu-nested a {
  font-size: 13px;
  padding: 8px 12px 8px 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.menu-group-nested .submenu-nested a.active {
  border-left-color: rgba(255, 255, 255, 0.65);
}

.logout-link {
  margin-top: 12px;
  opacity: 0.92;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.22) !important;
}

.content-area {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.content-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topbar {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #e6edf5;
}

.page-heading {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
}

.page-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.user-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  color: #0f172a;
}

.panel,
.card,
.hero-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

h1, h2, h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid.cols-2 {
  grid-template-columns: 1.2fr 1.8fr;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card .label {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.card .value,
.kpi {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 18px;
  margin-top: 10px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-grid label span {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14px;
  background: #f8fbff;
  color: #0f172a;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.search-bar input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
  background: #fff;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn.secondary,
button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-bar input {
  flex: 1;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  padding: 13px 14px;
  background: #f8fbff;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e9eef5;
  vertical-align: top;
}

.table-wrap th {
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
}

.pill.red {
  background: #ff4d4f;
  color: #fff;
}

.pill.yellow {
  background: #faad14;
  color: #fff;
}

.pill.green {
  background: #52c41a;
  color: #fff;
}

.pill.gray {
  background: #8c8c8c;
  color: #fff;
}

.priority-low {
  color: #999;
}

.priority-medium {
  color: #1890ff;
}

.priority-high {
  color: #fa8c16;
  font-weight: 600;
}

.priority-urgent {
  color: #ff4d4f;
  font-weight: 700;
}

.alert {
  background: #ecfeff;
  color: #155e75;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bae6fd;
  margin-bottom: 16px;
}

.note {
  margin-top: 14px;
  font-size: 13px;
  color: #64748b;
}

small {
  color: #64748b;
}

.panel h2 {
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .grid.cols-2,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.nav-flyout-docked-open .content-area {
    margin-left: 0;
  }

  .sidebar.sidebar--v2 .nav-rail-group .nav-flyout,
  .nav-flyout.nav-flyout--sheet {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(72vh, 560px);
    margin: 0;
    padding: 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18), 0 4px 16px rgba(15, 23, 42, 0.08);
    border-radius: 14px 14px 12px 12px;
    border-right: 0;
    background: #ffffff;
    z-index: 1050;
  }

  .sidebar.sidebar--v2 .nav-rail-group:not(.is-open) .nav-flyout:not(.nav-flyout--sheet) {
    display: none !important;
  }

  .sidebar.sidebar--v2 .nav-flyout-grid,
  .nav-flyout--sheet .nav-flyout-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar,
  .sidebar.sidebar--v2 {
    width: 100%;
    min-width: 100%;
    position: sticky;
    top: 0;
    height: auto;
  }

  .sidebar.sidebar--v2 .sidebar-inner {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
  }

  .sidebar.sidebar--v2 .brand-block--v2 {
    margin-bottom: 0;
    padding: 0 8px 0 0;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    width: auto;
  }

  .sidebar.sidebar--v2 .nav-rail {
    flex-direction: row;
    align-items: center;
    width: auto;
    flex: 1;
  }

  .sidebar.sidebar--v2 .nav-rail-group {
    width: auto;
  }

  .sidebar.sidebar--v2 .nav-rail-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 8px;
    width: auto;
    flex-direction: row;
  }

  .sidebar.sidebar--v2 .nav-rail-item > span:not(.nav-rail-badge) {
    display: none;
  }

  .sidebar:not(.sidebar--v2) .sidebar-inner {
    height: auto;
    overflow: visible;
  }

  body.nav-flyout-docked-open .content-area {
    margin-left: 0;
  }

  .content-area {
    padding: 18px;
    overflow: visible;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .search-bar {
    flex-direction: column;
  }
}

/* ——— Detay modal (Görüntüle) ——— */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.detail-modal-card {
  position: relative;
  width: min(920px, 100%);
  margin: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  padding: 24px 26px 28px;
}

.detail-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.detail-modal-close:hover {
  background: #f8fafc;
}

.detail-modal-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  padding-right: 72px;
}

.detail-modal-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: #64748b;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.detail-field,
.building-detail-field {
  min-width: 0;
}

.detail-field.full-width,
.building-detail-field.full-width {
  grid-column: 1 / -1;
}

.detail-field strong,
.building-detail-field strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}

.detail-field-value,
.building-detail-field > div:last-child {
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

.detail-field-pre {
  white-space: pre-wrap;
}

.detail-files a {
  color: #1d4ed8;
  font-weight: 600;
}

.detail-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.filter-chip.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.filter-chip-n {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.filter-chip.active .filter-chip-n {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.hub-stat-card--accent {
  background: linear-gradient(135deg, #eff6ff, #fff);
  border-color: #bfdbfe;
}

.tickets-panel--deep .tickets-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.tickets-panel--deep .ticket-row-urgent td {
  box-shadow: inset 3px 0 0 #b91c1c;
}

.tickets-panel--deep .row-actions .btn.sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.hub-stat-value-sm {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.entity-form-card {
  margin-bottom: 22px;
  padding: 20px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.entity-form-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.entity-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.users-hub-panel .list-table-wrap {
  margin-top: 0;
}

.users-table {
  min-width: 720px;
}

.users-table .col-actions {
  width: 180px;
}

.entity-edit-panel .form-grid,
.entity-edit-panel .users-form-grid {
  margin-top: 8px;
}

/* ——— Site footer ——— */
.site-footer {
  margin-top: auto;
  padding: 20px 24px 24px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.01em;
}

.site-footer-version {
  margin-top: 4px !important;
  color: #166534 !important;
  font-weight: 600;
}

/* ——— Giriş sayfası (misafir) ——— */
body.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f4f7fb;
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  color: #0f172a;
}

.login-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(380px, 1.05fr);
  min-height: 0;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  background:
    radial-gradient(ellipse 70% 55% at 15% 10%, rgba(255, 210, 100, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 45% at 95% 90%, rgba(232, 93, 26, 0.18), transparent 45%),
    linear-gradient(160deg, #15345f 0%, #1e4d8c 45%, #2a5a9e 100%);
  color: #fff;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h20v20H0V0zm20 20h20v20H20V20z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.logo-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 36px 28px;
  margin: 0 auto 36px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 20px 50px rgba(0, 0, 0, 0.18);
  max-width: 320px;
}

.logo-card img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
}

.brand-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.brand-desc {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.9;
  max-width: 34ch;
  margin: 0 auto;
}

.brand-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.brand-panel--photo {
  background:
    linear-gradient(160deg, rgba(15,32,64,0.82) 0%, rgba(21,52,95,0.78) 55%, rgba(30,77,140,0.7) 100%),
    var(--login-area-photo) center / cover no-repeat;
}
.brand-panel--photo::after {
  background: linear-gradient(180deg, rgba(15,23,42,0.15), rgba(15,23,42,0.35));
}
.brand-mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
}
.brand-mod-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 32px;
  background: #f4f7fb;
}

.login-form-panel-inner {
  width: 100%;
  max-width: 400px;
}

.login-form-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  padding: 32px 28px 28px;
}

.login-form-card h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: #163a6b;
}

.login-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.5;
}

.login-view-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}

.login-view-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.login-view-tab.active {
  background: #1e4d8c;
  border-color: #1e4d8c;
  color: #fff;
}

.login-field-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
}

.login-field input:focus {
  outline: none;
  border-color: #1e4d8c;
  box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.12);
}

.login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  cursor: pointer;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: #1e4d8c;
}

.login-link {
  color: #1e4d8c;
  font-weight: 600;
  text-decoration: none;
}

.login-link:hover {
  text-decoration: underline;
}

.login-btn-primary {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1e4d8c 0%, #163a6b 100%);
  box-shadow: 0 6px 18px rgba(30, 77, 140, 0.3);
}

.login-btn-primary:hover {
  filter: brightness(1.05);
}

.login-form-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

.login-back-link {
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 16px;
}

.login-back-link:hover {
  color: #1e4d8c;
}

.login-info-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: #9a3412;
  line-height: 1.55;
  margin-bottom: 18px;
}

.login-info-box-warn {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.login-info-box code {
  font-size: 12px;
}

.login-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: min(90vw, 480px);
  text-align: center;
}

.login-toast-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.login-toast-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.site-footer-guest {
  flex-shrink: 0;
}

/* ——— Public ticket (token link, no login) ——— */
.public-ticket-page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 20px 100px;
  background: linear-gradient(160deg, #eff6ff 0%, #f8fafc 45%, #f1f5f9 100%);
}

.public-ticket-card {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.public-ticket-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0369a1;
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 12px;
}

.public-ticket-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
  color: #0f172a;
}

.public-ticket-meta {
  margin: 0 0 20px;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

.public-ticket-warn {
  margin: 0 0 12px;
  color: #b91c1c;
  font-weight: 600;
}

.public-ticket-note {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
}

.public-ticket-dl {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 10px 16px;
}

.public-ticket-dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  font-size: 14px;
}

.public-ticket-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

.public-ticket-dl dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

.public-ticket-section h2 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #334155;
  font-weight: 600;
}

.public-ticket-body {
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

.public-ticket-files {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.public-ticket-files a {
  color: #1d4ed8;
  font-weight: 500;
}

.public-ticket-footnote {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.ticket-share-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ticket-share-link-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    padding: 36px 24px 32px;
  }

  .logo-card {
    padding: 24px 28px;
    margin-bottom: 24px;
    max-width: 280px;
  }

  .logo-card img {
    max-width: 200px;
  }
}

/* ——— Dashboard widgets ——— */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.dashboard-widgets-view {
  margin-top: 4px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  grid-auto-rows: minmax(72px, auto);
}

/* Ana dashboard: genişlik inline style (grid-column: span N); sınıf yedek */
.dashboard-widgets-view > .dashboard-widget.dashboard-grid-span-1:not([style*="grid-column"]) {
  grid-column: span 4;
}

.dashboard-widgets-view > .dashboard-widget.dashboard-grid-span-2:not([style*="grid-column"]) {
  grid-column: span 6;
}

.dashboard-widgets-view > .dashboard-widget.dashboard-grid-span-full:not([style*="grid-column"]) {
  grid-column: span 12;
}

.dashboard-layout-editor {
  margin-top: 4px;
  grid-auto-rows: minmax(72px, auto);
  align-items: start;
}

/* Özelleştirme: genişlik/yükseklik inline style ile (dashboard-layout.js) */

.dashboard-layout-item {
  position: relative;
  min-width: 0;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-layout-item.is-resizing {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  z-index: 5;
}

body.dashboard-resize-active {
  user-select: none;
}

.dash-resize-handle {
  position: absolute;
  z-index: 7;
  background: #3b82f6;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  opacity: 0.9;
}

.dash-resize-handle:hover {
  opacity: 1;
  background: #1d4ed8;
}

.dash-resize-n {
  top: -5px;
  left: 50%;
  width: 28px;
  height: 8px;
  margin-left: -14px;
  cursor: ns-resize;
  border-radius: 4px;
}

.dash-resize-s {
  bottom: -5px;
  left: 50%;
  width: 28px;
  height: 8px;
  margin-left: -14px;
  cursor: ns-resize;
  border-radius: 4px;
}

.dash-resize-e {
  top: 50%;
  right: -5px;
  width: 8px;
  height: 28px;
  margin-top: -14px;
  cursor: ew-resize;
  border-radius: 4px;
}

.dash-resize-w {
  top: 50%;
  left: -5px;
  width: 8px;
  height: 28px;
  margin-top: -14px;
  cursor: ew-resize;
  border-radius: 4px;
}

.dash-resize-nw,
.dash-resize-ne,
.dash-resize-sw,
.dash-resize-se {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dash-resize-nw {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}

.dash-resize-ne {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}

.dash-resize-sw {
  bottom: -6px;
  left: -6px;
  cursor: nesw-resize;
}

.dash-resize-se {
  bottom: -6px;
  right: -6px;
  cursor: nwse-resize;
}

.dash-cols-badge {
  position: absolute;
  bottom: 8px;
  left: 10px;
  z-index: 4;
  font-size: 10px;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 2px 6px;
  pointer-events: none;
}

.dashboard-layout-item.is-locked {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
}

.dashboard-layout-item.is-dragging {
  opacity: 0.6;
  border-color: #3b82f6;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.25);
}

.dashboard-layout-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  z-index: 3;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dashboard-layout-toolbar:active {
  cursor: grabbing;
}

.dashboard-layout-editor.is-drag-active .dashboard-layout-toolbar {
  cursor: grabbing;
}

.dashboard-drag-hint {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
}

.dashboard-layout-item.drag-over {
  border-color: #3b82f6;
  box-shadow: inset 0 4px 0 #3b82f6;
}

.dashboard-layout-item.drag-over-after {
  border-color: #3b82f6;
  box-shadow: inset 0 -4px 0 #3b82f6;
}

.dashboard-layout-title {
  font-size: 14px;
}

.dashboard-span-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}

.dashboard-span-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-right: 2px;
}

.dash-set-span.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.dashboard-layout-body {
  min-width: 0;
}

.dashboard-layout-body .dashboard-widget {
  margin: 0;
}

.dashboard-layout-placeholder {
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  padding: 24px 16px;
  background: #fff;
  text-align: center;
}

.dashboard-layout-placeholder p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.dashboard-widgets-view > .dashboard-widget {
  min-width: 0;
}

.dashboard-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
}

.dashboard-widget-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 14px;
  opacity: 0.65;
}

.dashboard-widget > .dashboard-kpi-card,
.dashboard-widget > .dashboard-chart-card,
.dashboard-widget > .dashboard-table-card,
.dashboard-widget > .dashboard-finance-card {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
}

.dashboard-kpi-value {
  display: block;
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.dashboard-widget-sub {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.dashboard-widget-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.dashboard-chart-card,
.dashboard-table-card,
.dashboard-finance-card,
.dashboard-kpi-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  background: #fff;
  box-sizing: border-box;
}

.dashboard-chart-card h3,
.dashboard-table-card h3,
.dashboard-finance-card h3,
.dashboard-kpi-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

/* Dikey çubuk grafik */
.dash-bar-chart {
  display: grid;
  gap: 8px 6px;
  align-items: end;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
  height: auto;
}

.dash-bar-chart--cols-1 { grid-template-columns: minmax(0, 1fr); }
.dash-bar-chart--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-bar-chart--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-bar-chart--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-bar-chart--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-bar-chart--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dash-bar-chart--cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dash-bar-chart--cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }

.dash-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  height: auto;
  align-self: end;
}

.dash-bar-track {
  width: 100%;
  max-width: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  background: #f1f5f9;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
}

.dash-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 6px 6px 0 0;
  min-height: 6px;
}

.dash-bar-meta {
  width: 100%;
  text-align: center;
}

.dash-bar-label {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
  word-break: break-word;
}

.dash-bar-value {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #1e40af;
}

.dashboard-finance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-finance-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 4px 0;
  line-height: 1.15;
}

.dashboard-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.dashboard-mini-table {
  width: 100%;
  min-width: 280px;
  font-size: 12px;
}

.dashboard-mini-table th,
.dashboard-mini-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.dashboard-customize-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 20px;
  align-items: start;
}

.dashboard-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.dashboard-add-form label {
  flex: 1;
  min-width: 140px;
}

.dashboard-widget-slot {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f8fafc;
}

.dashboard-widget-slot.is-locked {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
}

.dashboard-widget-slot-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.dashboard-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px dashed #94a3b8;
  background: #fff;
  color: #64748b;
  font-size: 14px;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dashboard-drag-handle:active {
  cursor: grabbing;
}

.dashboard-widget-slot.is-dragging {
  opacity: 0.55;
  border-style: solid;
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.dashboard-widget-slot.drag-over {
  border-color: #3b82f6;
  box-shadow: inset 0 3px 0 #3b82f6;
}

.dashboard-widget-slot.drag-over-after {
  border-color: #3b82f6;
  box-shadow: inset 0 -3px 0 #3b82f6;
}

.dashboard-sort-btns {
  display: inline-flex;
  gap: 4px;
}

.dashboard-slot-vendor select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  max-width: 180px;
}

.dashboard-slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.dashboard-locked-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #15803d;
}

.dashboard-mandatory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.dashboard-mandatory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.dashboard-mandatory-label {
  font-weight: 600;
}

.dashboard-role-mandatory {
  margin: 20px 0;
}

.dashboard-role-add-form {
  margin-top: 12px;
}

.vendor-delete-card h3 {
  color: #b91c1c;
}

.detail-dl {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 8px 16px;
  margin: 0;
}

.detail-dl dt {
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.detail-dl dd {
  margin: 0;
}

@media (max-width: 900px) {
  .dashboard-customize-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-finance-row {
    grid-template-columns: 1fr;
  }

  .dashboard-widgets-view > .dashboard-widget.dashboard-grid-span-1,
  .dashboard-layout-editor > .dashboard-layout-item.dashboard-grid-span-1 {
    grid-column: span 6;
  }

  .dashboard-widgets-view > .dashboard-widget.dashboard-grid-span-2,
  .dashboard-layout-editor > .dashboard-layout-item.dashboard-grid-span-2 {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  .dashboard-widgets-view > .dashboard-widget {
    grid-column: span 12 !important;
  }
}

@media (max-width: 720px) {
  .detail-modal-grid,
  .building-detail-grid,
  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-modal-card {
    padding: 18px 16px 22px;
  }
}

/* ——— Yazdırma (A4) ——— */
.only-print {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .only-print {
    display: block !important;
  }

  .no-print,
  .sidebar,
  .topbar,
  .search-bar,
  .content-inner > .alert,
  .alert,
  .btn,
  button,
  form {
    display: none !important;
  }

  .app-shell {
    display: block !important;
    min-height: auto !important;
  }

  .content-area,
  .content-inner {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .table-wrap {
    overflow: visible !important;
  }

  .print-sheet table,
  .building-print-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt;
    page-break-inside: auto;
  }

  .print-sheet table th,
  .print-sheet table td,
  .building-print-table th,
  .building-print-table td {
    border: 1px solid #333 !important;
    padding: 5px 7px !important;
    vertical-align: top !important;
    color: #000 !important;
    background: #fff !important;
  }

  .print-sheet table th,
  .building-print-table th {
    background: #f1f5f9 !important;
    font-weight: 700;
  }

  .print-page-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f172a;
  }

  .print-page-header h1 {
    margin: 0 0 4px;
    font-size: 18pt;
  }

  .print-page-header p {
    margin: 0;
    font-size: 9pt;
    color: #475569;
  }

  .print-section {
    margin-top: 16px;
    page-break-inside: avoid;
  }

  .print-section h3 {
    margin: 0 0 8px;
    font-size: 12pt;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4px;
  }

  .building-detail-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 18px !important;
  }

  .building-detail-grid .full-width {
    grid-column: 1 / -1 !important;
  }

  .building-detail-field strong {
    display: block;
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    margin-bottom: 3px;
  }

  .building-detail-field div {
    font-size: 10.5pt;
    color: #0f172a;
  }

  /* Bina listesi yazdır */
  body.print-buildings-list h1.no-print,
  body.print-buildings-list .content-inner > .alert,
  body.print-buildings-list .content-inner > *:not(#buildingsListBlock) {
    display: none !important;
  }

  body.print-buildings-list #buildingsListBlock .panel {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  body.print-buildings-list .col-actions {
    display: none !important;
  }

  /* Bina detay (modal) yazdır */
  body.print-building-detail .sidebar,
  body.print-building-detail .topbar,
  body.print-building-detail .site-footer,
  body.print-building-detail .content-inner > .alert,
  body.print-building-detail .content-inner > script,
  body.print-building-detail .content-inner > *:not(#buildingModal) {
    display: none !important;
  }

  body.print-building-detail #buildingModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  body.print-building-detail .building-modal-card {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.print-building-detail .building-map-img {
    max-width: 100% !important;
    max-height: 260px !important;
    object-fit: contain !important;
    page-break-inside: avoid;
  }

  body.print-building-detail .building-map-field {
    page-break-inside: avoid;
  }

  body.print-building-detail .building-map-attribution a {
    color: #334155 !important;
    text-decoration: none !important;
  }

  /* Arıza detay (modal) yazdır */
  body.print-ticket-detail .sidebar,
  body.print-ticket-detail .topbar,
  body.print-ticket-detail .site-footer,
  body.print-ticket-detail .content-inner > .alert,
  body.print-ticket-detail .content-inner > script,
  body.print-ticket-detail .content-inner > *:not(#ticketModal) {
    display: none !important;
  }

  body.print-ticket-detail #ticketModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  body.print-ticket-detail .ticket-modal-card {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.print-ticket-detail #ticketModal .no-print {
    display: none !important;
  }

  /* Hizmet firması detay (modal) yazdır */
  body.print-vendor-detail .sidebar,
  body.print-vendor-detail .topbar,
  body.print-vendor-detail .site-footer,
  body.print-vendor-detail .vendors-hub-panel,
  body.print-vendor-detail .content-inner > .alert,
  body.print-vendor-detail .content-inner > script,
  body.print-vendor-detail .content-inner > *:not(#vendorModal) {
    display: none !important;
  }

  body.print-vendor-detail .app-shell {
    display: block !important;
    min-height: 0 !important;
  }

  body.print-vendor-detail .content-area,
  body.print-vendor-detail .content-inner {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.print-vendor-detail #vendorModal {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    z-index: 99999 !important;
    box-shadow: none !important;
  }

  body.print-vendor-detail .vendor-modal-card {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.print-vendor-detail #vendorModal .no-print {
    display: none !important;
  }

  .ticket-detail-grid,
  .detail-modal-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 18px !important;
  }

  .ticket-detail-grid .full-width,
  .detail-modal-grid .full-width,
  .detail-field.full-width {
    grid-column: 1 / -1 !important;
  }

  .ticket-detail-field strong,
  .detail-field strong,
  .building-detail-field strong {
    display: block;
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    margin-bottom: 3px;
  }

  .ticket-detail-field div,
  .detail-field-value,
  .building-detail-field div {
    font-size: 10.5pt;
    color: #0f172a;
  }

  body.print-building-detail #buildingModal,
  body.print-ticket-detail #ticketModal,
  body.print-vendor-detail #vendorModal {
    display: block !important;
  }

  .ticket-log-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8.5pt;
  }

  .ticket-log-table th,
  .ticket-log-table td {
    border: 1px solid #333 !important;
    padding: 4px 6px !important;
    vertical-align: top !important;
  }

  body.print-tickets-list .content-inner > *:not(#ticketsListBlock) {
    display: none !important;
  }

  body.print-tickets-list #ticketsListBlock .panel {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  body.print-tickets-list .col-actions,
  body.print-tickets-list .status-cell-form,
  body.print-tickets-list .list-search,
  body.print-tickets-list .hub-stats-grid,
  body.print-tickets-list .filter-chips,
  body.print-tickets-list .list-page-head,
  body.print-tickets-list .detail-modal-overlay,
  body.print-tickets-list .list-page-head .list-toolbar-actions {
    display: none !important;
  }

  body.print-buildings-list .col-actions,
  body.print-buildings-list .status-cell-form,
  body.print-buildings-list .list-search,
  body.print-buildings-list .hub-stats-grid,
  body.print-buildings-list .list-page-head,
  body.print-buildings-list .detail-modal-overlay,
  body.print-buildings-list .list-page-head .list-toolbar-actions {
    display: none !important;
  }
}

/* ——— Liste panelleri (Arızalar + Binalar) ——— */
.btn.sm {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 10px;
  font-weight: 600;
}

.list-panel h2 {
  margin: 0;
  font-size: 22px;
}

.list-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.list-page-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: #64748b;
}

.list-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.list-search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.list-search input {
  flex: 1;
  border: 1px solid #d8e1eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
}

.list-table-wrap {
  border: 1px solid #e8eef5;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
}

.list-table {
  min-width: 900px;
}

.buildings-table {
  min-width: 980px;
}

.list-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 12px 14px;
  background: #f1f5f9;
}

.list-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 14px;
}

.list-table tbody tr:hover {
  background: #f8fbff;
}

.record-code {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.buildings-table .record-code {
  color: #0f766e;
  background: #ecfdf5;
}

.col-main {
  min-width: 220px;
  max-width: 320px;
}

.record-title {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.record-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.record-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.record-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.tickets-table .record-meta::before {
  content: "📍 ";
}

.col-summary {
  width: 100px;
}

.summary-line {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.summary-line.muted {
  margin-top: 3px;
  font-weight: 500;
  color: #94a3b8;
}

.col-finance {
  min-width: 130px;
}

.finance-line {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.finance-line.muted {
  margin-top: 3px;
  font-weight: 500;
  color: #64748b;
  font-size: 12px;
}

.col-subs {
  width: 90px;
  text-align: center;
}

.col-status {
  width: 130px;
}

.status-select {
  width: 100%;
  max-width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}

.status-select.status-open {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

.status-select.status-in_progress {
  border-color: #fcd34d;
  color: #a16207;
  background: #fffbeb;
}

.status-select.status-closed {
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

.status-select.status-cancelled {
  border-color: #cbd5e1;
  color: #475569;
  background: #f8fafc;
}

.status-select.status-active {
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

.status-select.status-passive {
  border-color: #cbd5e1;
  color: #475569;
  background: #f8fafc;
}

.col-priority {
  width: 90px;
}

.priority-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.priority-low .priority-badge {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.priority-medium .priority-badge {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.priority-high .priority-badge {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.priority-urgent .priority-badge {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.col-assignee {
  min-width: 100px;
  max-width: 140px;
  color: #334155;
}

.col-files {
  width: 80px;
  text-align: center;
}

.count-badge {
  border: 0;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.count-badge:hover {
  background: #bae6fd;
}

.text-muted {
  color: #94a3b8;
}

.col-actions {
  width: 200px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.row-actions .inline-form {
  display: inline;
  margin: 0;
}

.btn.sm.danger {
  padding: 8px 10px;
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn.sm.danger:hover {
  background: #fef2f2;
}

.empty-cell {
  text-align: center;
  padding: 32px !important;
  color: #64748b;
}

.status-cell-form {
  margin: 0;
}

@media (max-width: 1100px) {
  .col-actions {
    width: auto;
    min-width: 180px;
  }
}

/* ——— Raporlar ——— */
.reports-intro {
  margin-bottom: 20px;
}

.reports-intro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.reports-intro-head h2 {
  margin: 0 0 8px;
}

.reports-hub-search {
  flex: 1 1 220px;
  max-width: 320px;
  margin: 0;
}

.reports-hub-search input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  background: #f8fafc;
}

.reports-hub-search input:focus {
  outline: none;
  border-color: #38bdf8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.report-category-block {
  margin-bottom: 20px;
}

.report-category-block h3 {
  margin: 0 0 14px;
  font-size: 15px;
  color: #0f172a;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.report-card:hover {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.report-card strong {
  font-size: 14px;
  font-weight: 800;
}

.report-card span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.report-filters-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.report-filters-form {
  margin: 0;
}

.report-output .report-print-header h2 {
  margin: 0 0 6px;
}

.report-meta-line {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 0;
}

.report-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 13px;
}

.report-summary-item strong {
  color: #0369a1;
}

.report-table th,
.report-table td {
  font-size: 13px;
}

/* ——— Sistem logları ——— */
.logs-panel .list-page-desc {
  max-width: 720px;
}

.logs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

.logs-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.logs-filter-item span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.logs-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.logs-table-wrap {
  overflow-x: auto;
}

.logs-table th {
  font-size: 12px;
  white-space: nowrap;
}

.logs-table td {
  font-size: 13px;
  vertical-align: top;
  padding: 12px 10px;
}

.col-log-time {
  width: 150px;
  white-space: nowrap;
}

.col-log-user {
  width: 120px;
}

.col-log-module {
  width: 130px;
}

.col-log-action {
  width: 140px;
}

.col-log-device {
  width: 170px;
  min-width: 140px;
}

.col-log-record {
  width: 110px;
}

.col-log-summary {
  min-width: 160px;
}

.col-log-detail {
  min-width: 220px;
  max-width: 360px;
}

.log-time-main {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #0f172a;
}

.log-action-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.log-row.log-source-ticket .log-action-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.log-row.log-source-activity .log-action-badge {
  background: #f0fdf4;
  color: #15803d;
}

.log-device-cell {
  line-height: 1.35;
}

.log-device-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  max-width: 160px;
  white-space: normal;
}

.log-device-badge.log-device-desktop {
  background: #f1f5f9;
  color: #475569;
}

.log-device-badge.log-device-mobile {
  background: #fef3c7;
  color: #b45309;
}

.log-device-badge.log-device-tablet {
  background: #ede9fe;
  color: #6d28d9;
}

.log-ip-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.log-detail-cell {
  color: #475569;
  line-height: 1.45;
}

.log-detail-text {
  max-height: 120px;
  overflow-y: auto;
}

.logs-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .logs-table .col-log-detail {
    min-width: 180px;
  }
}

/* ——— Hub / roles / dashboard / users ——— */
.hub-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.hub-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
}

.hub-stat-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.hub-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.roles-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.role-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.role-card-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.role-card-desc,
.role-card-summary {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.role-coverage-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.role-coverage-bar span {
  display: block;
  height: 100%;
  background: #1d4ed8;
  border-radius: 999px;
}

.role-coverage-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

.role-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.inline-form {
  display: inline;
  margin: 0;
}

.role-form-actions,
.users-form-actions,
.settings-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.perm-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.perm-group {
  margin-bottom: 22px;
}

.perm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.perm-group-head h3 {
  margin: 0;
  font-size: 16px;
}

.perm-group-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.perm-matrix-wrap {
  margin-bottom: 0;
}

.perm-matrix th.perm-action-col,
.perm-matrix td.perm-cell {
  text-align: center;
  width: 90px;
}

.perm-module-col {
  min-width: 200px;
  text-align: left !important;
}

.perm-module-name {
  font-weight: 600;
}

.perm-cell.perm-na {
  background: #f8fafc;
  color: #94a3b8;
}

.perm-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.perm-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.perm-toggle-ui {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}

.perm-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.perm-check input:checked + .perm-toggle-ui {
  background: #1d4ed8;
}

.perm-check input:checked + .perm-toggle-ui::after {
  transform: translateX(14px);
}

.perm-dash {
  color: #94a3b8;
}

.btn.xs {
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 8px;
}

.users-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.users-side-panel h2 {
  margin-top: 0;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-kpi-grid .kpi-success .hub-stat-value { color: #15803d; }
.dashboard-kpi-grid .kpi-warning .hub-stat-value { color: #b45309; }
.dashboard-kpi-grid .kpi-info .hub-stat-value { color: #1d4ed8; }

.dashboard-finance-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
}

.dashboard-finance-value {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}

.settings-section-title {
  margin: 8px 0 0;
  font-size: 15px;
  color: #334155;
}

.settings-maint-card {
  margin-top: 20px;
}

.settings-maint-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.settings-maint-actions {
  display: inline-block;
  margin: 12px 12px 12px 0;
}

/* —— YBP checkbox / switch / filter (form) —— */
.ybp-check,
.ybp-switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.ybp-check {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ybp-check:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.ybp-check input,
.ybp-switch input,
.ybp-filter-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.ybp-check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #94a3b8;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ybp-check input:checked + .ybp-check-box {
  background: #2563eb;
  border-color: #2563eb;
}

.ybp-check input:checked + .ybp-check-box::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translateY(-1px);
}

.ybp-check input:focus-visible + .ybp-check-box,
.ybp-switch input:focus-visible + .ybp-switch-ui {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ybp-check-body strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.ybp-check-body span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.ybp-switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.18s ease;
}

.ybp-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease;
}

.ybp-switch input:checked + .ybp-switch-ui {
  background: #2563eb;
}

.ybp-switch input:checked + .ybp-switch-ui::after {
  transform: translateX(18px);
}

.ybp-switch input:disabled + .ybp-switch-ui,
.ybp-check input:disabled + .ybp-check-box {
  opacity: 0.55;
  cursor: not-allowed;
}

.ybp-switch-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.ybp-switch-text small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  font-weight: 400;
}

.ybp-switch.full,
.ybp-check.full,
.form-grid .ybp-check,
.form-grid .ybp-switch {
  grid-column: 1 / -1;
}

.ybp-switch--inline {
  align-items: center;
}

.ybp-switch--inline .ybp-switch-ui {
  margin-top: 0;
}

.login-field-row .ybp-switch--inline {
  flex: 1;
  min-width: 0;
}

.budget-robot-table-head .ybp-switch--inline {
  margin: 0;
}

.ybp-check-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-column: 1 / -1;
}

.ybp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.ybp-filter-chip:has(input:checked) {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
  font-weight: 600;
}

.ybp-filter-chip-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ybp-filter-chip:has(input:checked) .ybp-filter-chip-icon {
  background: #f59e0b;
  border-color: #f59e0b;
}

.ybp-filter-chip:has(input:checked) .ybp-filter-chip-icon::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ybp-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  align-self: end;
}

.ybp-check--compact {
  padding: 10px 12px;
}

.ybp-check--compact .ybp-check-body span {
  font-size: 11px;
}

input.ybp-table-check,
input.ybp-table-check[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

.settings-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.settings-checkbox-row input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.settings-netgsm-test {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 12px;
}

.settings-netgsm-test label {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.building-geocode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.geocode-status {
  font-size: 13px;
  color: #64748b;
  flex: 1;
  min-width: 200px;
}

.geocode-hint {
  margin: -4px 0 8px !important;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .hub-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-layout {
    grid-template-columns: 1fr;
  }
}

@media print {
  .sidebar,
  .topbar,
  .no-print,
  .site-footer,
  .report-toolbar,
  .report-filters-panel,
  .logout-link,
  script {
    display: none !important;
  }

  body.print-vendor-detail .vendors-hub-panel,
  body.print-vendor-detail .content-inner > *:not(#vendorModal),
  body.print-building-detail .content-inner > *:not(#buildingModal),
  body.print-ticket-detail .content-inner > *:not(#ticketModal) {
    display: none !important;
  }

  body.print-vendor-detail #vendorModal,
  body.print-building-detail #buildingModal,
  body.print-ticket-detail #ticketModal {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .app-shell {
    display: block;
  }

  .content-area {
    margin: 0;
    padding: 0;
  }

  .content-inner {
    max-width: none;
    padding: 0;
  }

  .report-output {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .list-table {
    font-size: 11px;
  }
}

.building-geocode-batch-panel {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #f8fafc;
}

.building-geocode-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.batch-geocode-progress {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 8px;
  margin: 8px 0;
}

.bulk-update-scroll {
  overflow-x: auto;
  margin-bottom: 16px;
}

.bulk-update-table input {
  width: 100%;
  min-width: 72px;
  box-sizing: border-box;
}

.bulk-update-table .bulk-update-meta {
  min-width: 160px;
  font-size: 13px;
}

.bulk-update-table .bulk-update-meta .muted {
  font-size: 12px;
  opacity: 0.75;
}

.bulk-update-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.building-map-field {
  margin-top: 4px;
}

.building-map-coords {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}

.building-map-wrap {
  margin-bottom: 8px;
}

.building-map-img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  min-height: 180px;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.building-map-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  max-width: 640px;
}

.building-map-attribution {
  margin: 0 0 10px;
  font-size: 11px;
  color: #94a3b8;
}

.building-map-attribution a {
  color: #64748b;
}

.building-map-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.building-map-embed {
  display: block;
  width: 100%;
  max-width: 640px;
  height: 300px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.geocode-batch-overlay {
  /* Global arama (z-index 2100) modalın üstünde kalmasın */
  z-index: 3200;
}

.geocode-batch-card {
  max-width: 720px;
  width: min(96vw, 720px);
  max-height: 90vh;
  overflow: auto;
}

.geocode-batch-list {
  max-height: 50vh;
  overflow-y: auto;
  margin: 14px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.geocode-batch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.geocode-batch-row:last-child {
  border-bottom: 0;
}

.geocode-batch-row.is-done .geocode-batch-icon {
  color: #047857;
}

.geocode-batch-row.is-fail .geocode-batch-icon {
  color: #b91c1c;
}

.geocode-batch-row.is-work .geocode-batch-icon {
  color: #1d4ed8;
}

.geocode-batch-info strong {
  margin-right: 6px;
}

.geocode-batch-info small {
  display: block;
  color: #64748b;
  margin-top: 2px;
}

.geocode-batch-msg {
  color: #475569;
  font-size: 12px;
  text-align: right;
  max-width: 180px;
}

.geocode-batch-loading {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: #64748b;
}

@media print {
  body.print-building-detail .building-map-embed {
    max-height: 260px !important;
    page-break-inside: avoid;
  }
}

.hidden {
  display: none !important;
}

.role-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-bottom: 16px;
}

.role-report-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.role-reports-category h4 {
  margin: 12px 0 8px;
  font-size: 14px;
  color: #334155;
}

.chat-rules-matrix-wrap {
  overflow-x: auto;
}

.chat-rules-matrix th,
.chat-rules-matrix td {
  text-align: center;
  vertical-align: middle;
}

.chat-rules-from-col {
  text-align: left !important;
  min-width: 140px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.chat-log-details {
  max-width: 320px;
  word-break: break-word;
}

.chat-app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 480px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.chat-contacts {
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.chat-contacts-head {
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.chat-contacts-search {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.chat-contact-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  font-weight: 400;
}

.chat-contact-search-input::placeholder {
  color: #94a3b8;
}

.chat-contact-search-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.chat-contact-item.hidden {
  display: none;
}

.chat-contacts-no-match {
  padding: 12px;
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.chat-contact-list-wrap {
  overflow-y: auto;
  flex: 1;
}

.chat-contact-group.hidden {
  display: none;
}

.chat-contact-group-title {
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.chat-contact-group-title--personel {
  background: #f0fdf4;
  color: #166534;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-contact-group-title--firma {
  background: #fff7ed;
  color: #9a3412;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-contact-group-title--offline {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  border: 0;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-contact-group--offline.is-collapsed .chat-offline-list {
  display: none;
}

.chat-contact-item--offline .chat-contact-btn {
  opacity: 0.82;
}

.chat-contact-empty-hint {
  padding: 10px 12px;
  font-size: 12px;
  color: #94a3b8;
  list-style: none;
}

.chat-contacts-view-toolbar {
  border-bottom: 1px solid #e2e8f0;
}

.chat-contact-group[data-group="firma"] .chat-contact-group-title:not(.chat-contact-group-title--firma) {
  background: #fff7ed;
  color: #9a3412;
}

.chat-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-contact-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.chat-contact-btn:hover {
  background: #f0f9ff;
  color: #0c4a6e;
}

.chat-contact-btn.active {
  background: #dbeafe;
  color: #1e3a8a;
  border-left: 3px solid #2563eb;
  padding-left: 9px;
}

.chat-contact-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #94a3b8;
}

.chat-contact-status.online {
  background: #22c55e;
}

.chat-contact-info {
  min-width: 0;
}

.chat-contact-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.chat-contact-btn:hover .chat-contact-info strong,
.chat-contact-btn.active .chat-contact-info strong {
  color: #1e3a8a;
}

.chat-contact-info small {
  display: block;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  background: #fff;
}

.chat-main-placeholder {
  margin: auto;
  padding: 24px;
  color: #64748b;
  text-align: center;
}

.chat-conversation {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-conv-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #1e6bb8, #185a9d);
  color: #fff;
}

.chat-conv-header h3 {
  margin: 0;
  font-size: 15px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f1f5f9;
}

.chat-msg {
  max-width: 75%;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.chat-msg.in {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  margin-right: auto;
}

.chat-msg.out {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
  margin-left: auto;
}

.chat-msg-meta {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
}

.chat-msg-file {
  color: #1d4ed8;
  text-decoration: none;
}

.chat-compose {
  border-top: 1px solid #e2e8f0;
  padding: 10px 12px;
  background: #fff;
}

.chat-compose textarea {
  width: 100%;
  resize: vertical;
  min-height: 48px;
  margin-top: 8px;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
}

.chat-compose textarea:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.chat-compose-actions {
  margin-top: 8px;
  text-align: right;
}

.chat-file-label {
  cursor: pointer;
  margin: 0;
}

.chat-readonly-hint {
  padding: 12px 16px;
  margin: 0;
}

@media (max-width: 768px) {
  .chat-app-layout {
    grid-template-columns: 1fr;
  }

  .chat-contacts {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}

/* MSN tarzı sohbet dock — sağ alt, tüm sayfalarda */
.chat-sidebar-link,
.nav-flyout-link.chat-sidebar-link {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.nav-flyout-link.chat-sidebar-link .chat-menu-badge {
  margin-left: auto;
}

.chat-menu-badge,
.chat-dock-badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}

.chat-menu-badge.hidden,
.chat-dock-badge.hidden {
  display: none !important;
}

.msn-dock {
  position: fixed;
  right: 16px;
  bottom: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 8px;
  z-index: 1200;
  pointer-events: none;
}

.msn-dock > * {
  pointer-events: auto;
}

.dock-tab {
  border: 1px solid #64748b;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #1e4d8c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-windows-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 8px;
}

.buddy-panel {
  width: 300px;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 440px;
}

.buddy-panel.hidden {
  display: none;
}

.buddy-header {
  background: linear-gradient(180deg, #1a6bb5 0%, #0d4a8f 100%);
  color: #fff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.win-btns {
  display: flex;
  gap: 4px;
}

.win-btn {
  width: 22px;
  height: 20px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.my-status {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
}

.my-status-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.msn-dock .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e4d8c, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
}

.msn-dock .avatar .dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.dot-online { background: #22c55e; }
.dot-offline { background: #94a3b8; }

.buddy-search {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.buddy-search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
}

.buddy-groups {
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

.buddy-view-toolbar {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.buddy-view-btn {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
}

.buddy-view-btn.active {
  background: #e8f0fa;
  color: #1e4d8c;
  border-color: #93c5fd;
}

.buddy-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 10px 12px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buddy-group-title--personel { color: #166534; }
.buddy-group-title--firma { color: #0f766e; }

.buddy-group-title--offline {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
  padding-top: 12px;
}

.buddy-group-title--offline:hover {
  background: #f8fafc;
}

.buddy-group-count {
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  color: #475569;
}

.buddy-group-empty {
  padding: 6px 12px 10px;
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.buddy-offline-block.is-collapsed .buddy-offline-items {
  display: none;
}

.buddy-offline-chevron {
  font-size: 10px;
  margin-right: 4px;
}

.buddy-item.buddy-item--offline {
  opacity: 0.78;
}

.buddy-item.buddy-item--offline:hover {
  opacity: 1;
}

.buddy-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border: 0;
  width: 100%;
  background: #fff;
  text-align: left;
  font: inherit;
  color: #0f172a;
}

.buddy-item:hover {
  background: #e8f4fc;
}

.buddy-item.has-unread {
  background: #fff8e6;
}

.buddy-item .info {
  flex: 1;
  min-width: 0;
}

.buddy-item .name {
  font-size: 13px;
  font-weight: 700;
  display: block;
  color: #0f172a;
}

.buddy-item .status-msg {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.buddy-item .unread {
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buddy-empty {
  padding: 12px;
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.chat-window {
  width: 320px;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  max-height: 380px;
}

.chat-window.minimized .chat-body,
.chat-window.minimized .chat-compose,
.chat-window.minimized .chat-readonly-dock {
  display: none;
}

.chat-window .chat-header {
  color: #fff;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(180deg, #1a6bb5 0%, #0d4a8f 100%);
}

.chat-window .chat-header .title {
  flex: 1;
  min-width: 0;
}

.chat-window .chat-header .subtitle {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.9;
}

.chat-window .chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #f1f5f9;
  min-height: 120px;
  max-height: 220px;
}

.chat-window .msg {
  max-width: 88%;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.chat-window .msg-in {
  background: #fff;
  border: 1px solid #cbd5e1;
  margin-right: auto;
}

.chat-window .msg-out {
  background: #dcfce7;
  border: 1px solid #86efac;
  margin-left: auto;
}

.chat-window .msg-time {
  font-size: 9px;
  color: #64748b;
  margin-top: 4px;
}

.chat-window .chat-compose {
  border-top: 1px solid #e2e8f0;
  padding: 8px;
}

.chat-window .chat-compose textarea {
  width: 100%;
  min-height: 44px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  resize: vertical;
  color: #0f172a;
}

.chat-window .send-row {
  margin-top: 6px;
  text-align: right;
}

.chat-window .btn-send {
  border: 0;
  border-radius: 6px;
  background: #1d4ed8;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.chat-readonly-dock {
  padding: 8px 10px;
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.chat-file-label {
  cursor: pointer;
  font-size: 14px;
}

@media (max-width: 768px) {
  .msn-dock {
    right: 8px;
    left: 8px;
  }

  .buddy-panel,
  .chat-window {
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}

/* ——— Platform v3 ——— */
.topbar { flex-wrap: wrap; gap: 12px; overflow: visible; }
.topbar-tools { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; overflow: visible; }
.global-search-wrap { position: relative; min-width: 220px; max-width: 420px; flex: 1; z-index: 2100; overflow: visible; }
.global-search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.global-search-wrap:focus-within .global-search-bar,
.global-search-bar.is-open {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}
.global-search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 9px 4px 9px 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.global-search-kbd {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1.4;
}
.global-search-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.global-search-tabs.hidden { display: none; }
.global-search-tabs button {
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.global-search-tabs button.on {
  background: #0f172a;
  color: #fff;
}
.global-search-results.has-tabs {
  border-radius: 0 0 12px 12px;
  top: calc(100% + 0px);
  border-top: 0;
}
.global-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.global-search-bar.is-evrak-only .global-search-chip,
.global-search-chip:has(input:checked) {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.global-search-chip input { width: auto; margin: 0; accent-color: #2563eb; }
.global-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 2000; max-height: 360px; overflow: auto; }
.global-search-results.hidden { display: none; }
.gs-group { padding: 8px 12px; border-bottom: 1px solid #eee; }
.gs-item { display: block; padding: 6px 0; color: #1a5fb4; font-size: 13px; }
.gs-item--menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 0;
  text-decoration: none;
}
.gs-item--menu:hover .gs-item-label { text-decoration: underline; }
.gs-item-path {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.2;
}
.gs-item-label {
  color: #1a5fb4;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.gs-empty { padding: 12px; color: #666; font-size: 13px; }
.announcement-banner { background: #fff8e6; border: 1px solid #f0d78c; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
body.theme-dark { background: #1a1d23; color: #e8eaed; }
body.theme-dark .panel { background: #252830; color: #e8eaed; }
body.theme-dark .sidebar:not(.sidebar--v2) { background: #1e2128; }

body.theme-dark .sidebar.sidebar--v2 {
  background: linear-gradient(180deg, #1e2128, #15181e);
  border-color: #3d4450;
  color: #e8eaed;
}

body.theme-dark .sidebar.sidebar--v2 .brand-block--v2 {
  border-color: #3d4450;
}

body.theme-dark .sidebar.sidebar--v2 .brand-title { color: #f1f5f9; }
body.theme-dark .sidebar.sidebar--v2 .brand-subtitle { color: #9aa0a6; }
body.theme-dark .sidebar.sidebar--v2 .nav-rail-item { color: #9aa0a6; }
body.theme-dark .sidebar.sidebar--v2 .nav-rail-item:hover { background: #2d323c; color: #e8eaed; }
body.theme-dark .sidebar.sidebar--v2 .nav-rail-item.is-active,
body.theme-dark .sidebar.sidebar--v2 .nav-rail-group.is-open > .nav-rail-item {
  background: linear-gradient(135deg, #1e3a5f, #1d4ed8);
  color: #93c5fd;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout {
  background: #252830;
  border-color: #3d4450;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-head {
  border-bottom-color: #3d4450;
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-head h2 {
  color: #9aa0a6;
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-pin-label { color: #9aa0a6; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-pin {
  background: #1e3a5f;
  border-color: #1e40af;
  color: #93c5fd;
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-pin:hover {
  background: #1e40af;
  color: #e0f2fe;
}
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-col-title { color: #e8eaed; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-link { color: #9aa0a6; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-link:hover { background: #2d323c; color: #93c5fd; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-link.active {
  background: linear-gradient(90deg, #1e3a5f, #1e293b);
  color: #93c5fd;
  border-color: #3b82f6;
}
body.theme-dark .sidebar.sidebar--v2 .nav-rail-footer { border-color: #3d4450; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-badge { background: #1e3a5f; color: #93c5fd; }
body.theme-dark .sidebar.sidebar--v2 .nav-rail-footer { border-color: #3d4450; }
body.theme-dark .sidebar.sidebar--v2 .nav-flyout-badge { background: #1e3a5f; color: #93c5fd; }
body.theme-dark .global-search-bar { background: #2d323c; border-color: #444; }
body.theme-dark .global-search-bar input { color: #eee; }
body.theme-dark .ybp-check {
  border-color: #3d4450;
  background: transparent;
}
body.theme-dark .ybp-check:hover {
  background: #2d323c;
  border-color: #4b5563;
}
body.theme-dark .ybp-check-body strong,
body.theme-dark .ybp-switch-text strong {
  color: #e8eaed;
}
body.theme-dark .ybp-check-body span,
body.theme-dark .ybp-switch-text small {
  color: #9aa0a6;
}
body.theme-dark .ybp-filter-chip {
  background: #2d323c;
  border-color: #444;
  color: #9aa0a6;
}
body.theme-dark .ybp-filter-chip:has(input:checked) {
  background: #422006;
  border-color: #b45309;
  color: #fcd34d;
}
body.theme-dark .global-search-chip:has(input:checked) { background: #1e3a5f; color: #93c5fd; border-color: #3b82f6; }
body.theme-dark .global-search-results { background: #2d323c; border-color: #444; }
body.theme-dark .gs-item-path { color: #9aa0a6; }
body.theme-dark .gs-item-label { color: #93c5fd; }
body.theme-dark .dashboard-chart-card,
body.theme-dark .dashboard-table-card,
body.theme-dark .dashboard-finance-card,
body.theme-dark .dashboard-kpi-card { background: #2d323c; border-color: #444; }
body.theme-dark .dashboard-chart-card h3,
body.theme-dark .dashboard-table-card h3,
body.theme-dark .dashboard-finance-card h3,
body.theme-dark .dashboard-kpi-card h3 { color: #e8eaed; }
body.theme-dark .dashboard-kpi-value { color: #e8eaed; }
body.theme-dark .dash-bar-track { background: #1e2128; }
body.theme-dark .dash-bar-label,
body.theme-dark .dashboard-widget-sub,
body.theme-dark .dashboard-widget-empty { color: #9aa0a6; }
body.theme-dark .dash-bar-value { color: #93c5fd; }

/* ——— Bütçe robotu ——— */
.budget-robot-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.budget-robot-stats .hub-stat-card {
  min-width: 0;
  container-type: inline-size;
}
.budget-robot-stats .hub-stat-value {
  display: block;
  max-width: 100%;
  font-size: clamp(0.9375rem, 11cqi, 1.625rem);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
@media (max-width: 900px) {
  .budget-robot-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .budget-robot-stats {
    grid-template-columns: 1fr;
  }
}
.budget-robot-accent { color: #1e4d8c; }
.budget-robot-note {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
}
.budget-robot-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .budget-robot-grid { grid-template-columns: 1fr; }
}
.budget-robot-table .col-indent { padding-left: 20px; }
.budget-robot-group-row td {
  background: #f8fafc;
  font-size: 13px;
}
.budget-robot-group-total {
  float: right;
  font-weight: 600;
  color: #1e4d8c;
}
.budget-robot-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}
.budget-robot-pill--equal { background: #dbeafe; color: #1d4ed8; }
.budget-robot-pill--land_share { background: #fef3c7; color: #b45309; }
.budget-robot-pill--area_m2 { background: #d1fae5; color: #047857; }
.budget-robot-pill--fixed_per_unit { background: #f3e8ff; color: #7c3aed; }
.budget-robot-pill--building { background: #f1f5f9; color: #475569; }
.budget-robot-table input[type="number"],
.budget-robot-table select {
  width: 100%;
  max-width: 120px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}
.budget-robot-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1px solid #bfdbfe;
}
.budget-robot-result-value {
  font-size: clamp(1.125rem, 4vw, 1.625rem);
  font-weight: 700;
  color: #1e4d8c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 100%;
}
.budget-robot-delta { font-size: 13px; color: #d97706; display: block; margin-top: 4px; }
.budget-robot-result-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.budget-robot-check { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.budget-robot-kmk-warn {
  font-size: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  color: #92400e;
}
.budget-robot-kmk-ok { font-size: 12px; color: #059669; }
.budget-robot-disclaimer { font-size: 11px; color: #94a3b8; margin-top: 10px; }
.budget-robot-legend { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.budget-robot-legend li { margin-bottom: 8px; }
.budget-robot-context { margin-bottom: 8px; }
.budget-robot-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.budget-robot-table-head h3 { margin: 0; }
.budget-robot-hide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.budget-robot-hidden { display: none !important; }
.budget-robot-table input.br-field-muted {
  background: #f1f5f9;
  color: #64748b;
}
.budget-robot-table input.br-field-active {
  border-color: #7c3aed;
  background: #faf5ff;
}

/* Genel kurul robotu */
.gk-robot-kmk-note {
  font-size: 12px;
  color: #64748b;
  background: #e8f0fa;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.gk-robot-context { margin-bottom: 8px; }
.gk-robot-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1000px) {
  .gk-robot-layout { grid-template-columns: 1fr; }
}
.gk-madde {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}
.gk-madde-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f8fafc;
  cursor: pointer;
}
.gk-madde-drag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: #94a3b8;
  font-size: 14px;
  letter-spacing: -2px;
  cursor: grab;
  flex-shrink: 0;
  user-select: none;
  touch-action: none;
}
.gk-madde-drag:active { cursor: grabbing; }
.gk-madde--dragging {
  opacity: 0.45;
  border-color: #1e4d8c;
  box-shadow: 0 8px 24px rgba(30, 77, 140, 0.15);
}
.gk-drop-line {
  height: 4px;
  margin: 6px 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e4d8c, #3b82f6);
  pointer-events: none;
}
body.gk-sorting-active {
  cursor: grabbing;
  user-select: none;
}
body.gk-sorting-active .gk-madde-drag {
  cursor: grabbing;
}

/* KMK / Mevzuat Rehber */
.kmk-source-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.kmk-source-bar label { font-size: 13px; font-weight: 600; color: #334155; }
.kmk-source-select {
  min-width: 220px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.kmk-toc-item .kmk-toc-src {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
}
.kmk-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  margin-left: 6px;
  vertical-align: middle;
}
.kmk-badge--ai { background: #ede9fe; color: #5b21b6; }
.kmk-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 720px) { .kmk-feat-grid { grid-template-columns: 1fr; } }
.kmk-feat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}
.kmk-feat strong { display: block; font-size: 13px; margin-bottom: 4px; }
.kmk-feat span { font-size: 12px; color: #64748b; line-height: 1.45; }
.kmk-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.kmk-tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  color: #64748b;
  font-family: inherit;
}
.kmk-tab.active { background: #1e4d8c; color: #fff; border-color: #1e4d8c; }
.kmk-tab--ai.active { background: #6d28d9; border-color: #6d28d9; }
.kmk-panel { display: none; }
.kmk-panel.active { display: block; }
.kmk-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 960px) { .kmk-layout { grid-template-columns: 1fr; } }
.kmk-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.kmk-card-h {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f0f7ff, #fff);
}
.kmk-card-h h3 { margin: 0; font-size: 14px; }
.kmk-card-h p { margin: 4px 0 0; font-size: 12px; color: #64748b; }
.kmk-card-b { padding: 12px 14px; }
.kmk-search-box { display: flex; gap: 8px; margin-bottom: 10px; }
.kmk-search-box input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
}
.kmk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kmk-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  color: #475569;
}
.kmk-chip:hover { border-color: #1e4d8c; color: #1e4d8c; background: #e8f0fa; }
.kmk-result-list {
  display: flex;
  flex-direction: column;
  max-height: 62vh;
  overflow-y: auto;
}
.kmk-result-list button.kmk-result-item,
button.kmk-result-item {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
}
.kmk-result-item:hover,
.kmk-result-item.selected { background: #e8f0fa; }
.kmk-result-madde { font-size: 11px; font-weight: 700; color: #1e4d8c; margin-bottom: 3px; }
.kmk-result-snippet { font-size: 12px; line-height: 1.5; color: #334155; }
.kmk-result-meta { font-size: 11px; color: #64748b; margin-top: 4px; }
.kmk-madde-view { max-height: 72vh; overflow-y: auto; font-size: 13px; line-height: 1.65; }
.kmk-madde-no { font-size: 16px; font-weight: 700; color: #1e4d8c; margin-bottom: 6px; }
.kmk-madde-section { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.kmk-madde-text { text-align: justify; }
.kmk-madde-text mark { background: #fef08a; padding: 0 2px; }
.kmk-toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 70vh;
  overflow-y: auto;
}
/* Global button { inline-flex } ile çakışmayı önle — madde listesi dikey kalmalı */
.kmk-toc-list button.kmk-toc-item,
button.kmk-toc-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
button.kmk-toc-item:hover { background: #f8fafc; }
.kmk-toc-no {
  min-width: 36px;
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #1e4d8c;
  text-align: center;
}
.kmk-empty { text-align: center; padding: 24px 12px; color: #64748b; font-size: 13px; }
.kmk-warn {
  font-size: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.kmk-settings-hint {
  font-size: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.kmk-ai-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .kmk-ai-layout { grid-template-columns: 1fr; } }
.kmk-ai-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}
.kmk-ai-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kmk-btn-ai {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff;
  border: none;
}
.kmk-btn-ai:disabled { opacity: 0.5; cursor: not-allowed; }
.kmk-ai-answer {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  min-height: 120px;
}
.kmk-ai-refs { margin-top: 12px; padding-top: 10px; border-top: 1px solid #ddd6fe; }
.kmk-ai-ref {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 6px;
  padding: 6px 8px;
  border: none;
  background: #ede9fe;
  border-radius: 6px;
  color: #1e4d8c;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.kmk-ai-disclaimer { font-size: 11px; color: #94a3b8; margin-top: 12px; }
.gk-madde.is-open .gk-madde-head { border-bottom: 1px solid #e2e8f0; }
.gk-madde-no {
  width: 24px;
  height: 24px;
  background: #1e4d8c;
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gk-madde-title { flex: 1; font-weight: 600; font-size: 13px; }
.gk-madde-body { display: none; padding: 12px 14px 14px; }
.gk-madde.is-open .gk-madde-body { display: block; }
.gk-var-strip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.gk-var-strip-title {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.gk-var-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.gk-var-strip-empty { font-size: 12px; color: #64748b; font-style: italic; }
.gk-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 3px;
}
.gk-field input,
.gk-field select,
.gk-field textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
}
.gk-field--wide { grid-column: 1 / -1; }
.gk-metin-block label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.gk-metin-hint { font-weight: 500; color: #d97706; }
.gk-metin-ta {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.gk-metin-ta.manual {
  border-color: #d97706;
  background: #fffbeb;
}
.gk-metin-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gk-robot-add-ek {
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  width: 100%;
  background: transparent;
  font-family: inherit;
}
.gk-robot-add-ek:hover {
  border-color: #1e4d8c;
  color: #1e4d8c;
  background: #e8f0fa;
}
.gk-robot-preview {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  position: sticky;
  top: 10px;
}
.gk-robot-preview-head {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f0f7ff, #fff);
}
.gk-robot-preview-head h3 { margin: 0; font-size: 14px; }
.gk-robot-preview-head p { margin: 4px 0 0; font-size: 12px; color: #64748b; }
.gk-robot-preview-body {
  padding: 14px;
  max-height: 78vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
}

/* ——— Bina giriş QR / portal ——— */
.bina-portal-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  vertical-align: middle;
}
.bina-portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bina-portal-tab {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.bina-portal-tab.is-active {
  background: #1e4d8c;
  color: #fff;
  border-color: #1e4d8c;
}
.bina-portal-card { margin-top: 0; }
.bina-portal-door .bina-portal-door-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0f172a;
}
.bina-qr-print-card {
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.bina-qr-building-name { font-size: 18px; font-weight: 700; margin: 12px 0 4px; }
.bina-qr-code { font-size: 13px; color: #64748b; margin: 0; }
.bina-qr-hint { font-size: 12px; color: #1e4d8c; margin: 10px 0 0; font-weight: 600; }
.bina-qr-url { font-size: 11px; word-break: break-all; margin-top: 12px; }

.bina-modal-qr {
  margin: 0 0 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.bina-modal-qr-visual {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.bina-modal-qr-img {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.bina-modal-qr-text {
  flex: 1;
  min-width: 180px;
  font-size: 13px;
  line-height: 1.5;
}
.bina-modal-qr-text p {
  margin: 6px 0 10px;
  color: #64748b;
  font-size: 12px;
}
@media (max-width: 520px) {
  .bina-modal-qr-visual { justify-content: center; text-align: center; }
}
@media print {
  body.print-building-detail .sidebar,
  body.print-building-detail .topbar,
  .list-page-head .list-toolbar-actions,
  .no-print { display: none !important; }
  .bina-qr-print-card { border: none; box-shadow: none; }
}
.gk-robot-preview-body p { margin-bottom: 10px; text-align: justify; }
.gk-preview-title { text-align: center; font-weight: 700; }
.gk-preview-meta { text-align: center; font-size: 12px; color: #64748b; margin-bottom: 12px !important; }
.gk-preview-no { font-weight: 700; color: #1e4d8c; }