/* MyHexnet Uygulama Merkezi — Odoo-benzeri açık kartlar + doğa arka plan */

#appCenter.app-center {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  color: var(--hx-text, #1f2a37);
  font-family: var(--hx-font, "Segoe UI", system-ui, sans-serif);
  overflow: auto;
  -webkit-font-smoothing: antialiased;
}

#appCenter.app-center.hidden {
  display: none !important;
}

/* Doğa manzarası yalnızca arka plan — UI bileşeni değil */
.app-center__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #dfe7ef;
  background-image: url("../img/app-center-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.app-center__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Hafif aydınlatma: kart ve yazı okunaklı kalsın, manzara görünsün */
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.55) 0%, rgba(248, 250, 252, 0.22) 38%, rgba(248, 250, 252, 0.4) 100%);
  pointer-events: none;
}

.app-center__shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Açık, ince üst bar */
.app-center__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hx-border, #e6e8ee);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.app-center__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-center__brand-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.app-center__brand-divider {
  width: 1px;
  height: 24px;
  background: var(--hx-border-strong, #d5d9e2);
  flex-shrink: 0;
}

.app-center__brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hx-text, #1f2a37);
  white-space: nowrap;
}

.app-center__top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-center__company {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--hx-border, #e6e8ee);
  background: #fff;
  color: var(--hx-text, #1f2a37);
  font-size: 0.88rem;
  max-width: 250px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-center__company i {
  color: var(--hx-text-secondary, #5b6578);
}

.app-center__company select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  max-width: 190px;
  outline: none;
  cursor: pointer;
}

.app-center__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--hx-border, #e6e8ee);
  background: #fff;
  color: var(--hx-text-secondary, #5b6578);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-center__icon-btn:hover {
  background: var(--hx-surface-muted, #f7f8fa);
  color: var(--hx-text, #1f2a37);
  border-color: var(--hx-border-strong, #d5d9e2);
}

.app-center__notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hx-danger, #e53935);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.app-center__notify-badge.hidden {
  display: none;
}

.app-center__user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--hx-border, #e6e8ee);
  background: #fff;
  color: var(--hx-text, #1f2a37);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-center__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #7e57c2;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.app-center__user-menu {
  position: relative;
}

.app-center__user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 6px;
  border-radius: var(--hx-radius, 12px);
  background: #fff;
  border: 1px solid var(--hx-border, #e6e8ee);
  box-shadow: var(--hx-shadow-hover, 0 14px 32px rgba(16, 24, 40, 0.12));
  z-index: 5;
}

.app-center__user-dropdown.hidden {
  display: none;
}

.app-center__user-dropdown button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--hx-text, #1f2a37);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}

.app-center__user-dropdown button:hover {
  background: var(--hx-surface-muted, #f7f8fa);
}

.app-center__user-dropdown button.is-danger {
  color: var(--hx-danger, #e53935);
}

.app-center__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  text-align: center;
}

/* Başlık bloğu — okunabilirlik için hafif açık yüzey */
.app-center__hero {
  margin-bottom: 28px;
  padding: 18px 28px 20px;
  border-radius: var(--hx-radius-xl, 20px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 640px;
}

.app-center__eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hx-text-muted, #8b93a7);
}

.app-center__title {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #152033;
}

.app-center__subtitle {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--hx-text-secondary, #5b6578);
}

.app-center__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: min(1080px, 100%);
  justify-content: center;
}

.app-center__grid.app-center__grid--with-findpartner {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(1280px, 100%);
}

/* Uygulama kartları = .hx-card (hexnet-ui); burada boyut */
.app-center__grid .hx-card {
  min-height: 232px;
  width: 100%;
  font: inherit;
}

.app-center__grid .hx-card__go {
  align-self: flex-start;
}

/* Platform topbar app switcher */
.topbar-app-switcher {
  position: relative;
  margin-right: 4px;
}

.topbar-app-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--hx-border, #d0d7de);
  background: var(--hx-surface, #fff);
  color: var(--hx-text, #1f2937);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.topbar-app-switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--hx-border, #d0d7de);
  background: #fff;
  box-shadow: var(--hx-shadow-hover, 0 10px 28px rgba(15, 23, 42, 0.12));
  z-index: 40;
}

.topbar-app-switcher__menu.hidden {
  display: none;
}

.topbar-app-switcher__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.topbar-app-switcher__item:hover {
  background: rgba(25, 118, 210, 0.08);
}

.topbar-app-switcher__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.topbar-app-switcher__dot--platform {
  background: #1976d2;
}
.topbar-app-switcher__dot--ops {
  background: #ef6c00;
}
.topbar-app-switcher__dot--ticari {
  background: #2e7d32;
}
.topbar-app-switcher__dot--yonetim {
  background: #7b1fa2;
}
.topbar-app-switcher__dot--findpartner {
  background: #0891b2;
}

.module-stub {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  color: #1f2937;
  font-family: var(--hx-font, "Segoe UI", system-ui, sans-serif);
}

.module-stub__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid var(--hx-border, #e5e7eb);
}

.module-stub__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.module-stub__body h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.module-stub__body p {
  margin: 0 0 20px;
  color: #6b7280;
  max-width: 420px;
}

.module-stub__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: #1976d2;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .app-center__grid.app-center__grid--with-findpartner {
    width: min(920px, 100%);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-center__grid {
    width: min(700px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-center__grid.app-center__grid--with-findpartner {
    width: min(700px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .app-center__company {
    display: none;
  }
}

@media (max-width: 560px) {
  .app-center__topbar {
    padding: 10px 14px;
  }

  .app-center__brand-name {
    display: none;
  }

  .app-center__main {
    padding: 28px 14px 40px;
  }

  .app-center__hero {
    padding: 14px 16px 16px;
    margin-bottom: 20px;
  }

  .app-center__grid {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }

  .app-center__user span.app-center__user-label {
    display: none;
  }
}
