/* -------------------------------------------------------------------------
   Ortak uygulama kabugu (COES Muhasebe): tum sayfalarda ayni sol menu.
   Sadece renk paleti + sidebar/nav stilleri burada; sayfaya ozel ara
   bolmeler kendi css dosyalarinda (styles.css, fis-styles.css) kalir.
   ------------------------------------------------------------------------- */

:root {
  /* Bu tonlar logonun kendi arka plan rengiyle (koyu lacivert duvar) birebir
     eslesecek sekilde secildi; logo artik seffaf kesim (arka plani
     kaldirilmis PNG) oldugu icin, buradaki lacivert ile logonun oturdugu
     yuzey ayni renk olunca "kutu icine yapistirilmis" gorunumu ortadan
     kalkiyor. */
  --coes-navy-900: #0a1c4d;
  --coes-navy-800: #132a63;
  --coes-navy-700: #1d3a80;
  --coes-blue-deep: #0156ca;
  --coes-blue-bright: #50d5fe;
  --coes-silver: #eef1fa;
  --coes-silver-dim: #aab6da;
  --coes-sidebar-width: 226px;
  --coes-sidebar-width-collapsed: 68px;
}

.app-shell {
  display: flex;
  align-items: stretch;
}

.app-sidebar {
  flex: 0 0 auto;
  width: var(--coes-sidebar-width);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--coes-navy-900), var(--coes-navy-800));
  border-right: 1px solid rgba(80, 213, 254, 0.2);
  transition: width 0.18s ease;
  overflow: hidden;
}

.app-sidebar.collapsed {
  width: var(--coes-sidebar-width-collapsed);
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  white-space: nowrap;
}

.app-logo {
  height: 30px;
  width: auto;
  flex: 0 0 auto;
}

.app-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  transition: opacity 0.12s ease;
}

.app-sidebar.collapsed .app-title {
  opacity: 0;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  flex: 1 1 auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--coes-silver);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-btn:hover {
  background: rgba(80, 213, 254, 0.16);
  color: #ffffff;
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--coes-blue-deep), var(--coes-blue-bright));
  color: #06162f;
  border-color: transparent;
  font-weight: 700;
}

.nav-btn-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn-icon svg {
  width: 100%;
  height: 100%;
}

.app-sidebar.collapsed .nav-btn-label,
.app-sidebar.collapsed .app-sidebar-toggle span:last-child,
.app-sidebar.collapsed .app-logout span:last-child {
  display: none;
}

.app-sidebar-foot {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.app-sidebar-toggle,
.app-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--coes-silver-dim);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.app-sidebar-toggle {
  margin-bottom: 6px;
}

.app-sidebar-toggle:hover,
.app-logout:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

/* Ortak ust bar (firma secici) - tum sayfalarda ayni gorsel dil, Luca'daki
   sag ust kosedeki firma secici ile ayni mantik: buton + tiklaninca acilan
   liste. Yerlestirme mantigi icin bkz. shell.js mountAppTopbar(). */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #dde5f5;
}

.company-picker {
  position: relative;
}

.company-picker-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #c3cee3;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.company-picker-button:hover:not(:disabled) {
  border-color: #7fb3f0;
}

.company-picker-button:focus-visible,
.company-picker-button.open {
  outline: none;
  border-color: #0156ca;
  box-shadow: 0 0 0 3px rgba(1, 86, 202, 0.14);
}

.company-picker-button:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.company-picker-icon {
  flex: 0 0 auto;
  color: #0156ca;
}

.company-picker-caret {
  flex: 0 0 auto;
  color: #64748b;
  transition: transform 0.15s ease, color 0.15s ease;
}

.company-picker-button.open .company-picker-caret {
  transform: rotate(180deg);
  color: #0156ca;
}

.company-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #d3ddf0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.company-picker-dropdown[hidden] {
  display: none;
}

.company-picker-option {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.company-picker-option:last-child {
  border-bottom: none;
}

.company-picker-option:hover {
  background: #eef3fc;
}

.company-picker-option.active {
  background: #e6eefd;
  color: #0156ca;
  font-weight: 800;
}

.company-picker-empty {
  padding: 12px;
  color: #94a3b8;
  font-size: 12.5px;
  font-style: italic;
  text-align: center;
}

@media (max-width: 720px) {
  .app-sidebar {
    width: var(--coes-sidebar-width-collapsed);
  }

  .app-title,
  .nav-btn-label,
  .app-sidebar-toggle span:last-child,
  .app-logout span:last-child {
    display: none;
  }
}
