/* PANEL-03 · Yeni pencereler kendiliğinden yerine düşer — şablon CSS'ine dokunmaz */

.stage {
  position: relative;
}

.scene {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  transform-origin: 0 100%;
}

.winsbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--taskbar-h);
  z-index: 16;
  pointer-events: none;
}

.wb-thumbs {
  position: relative;
  height: 174px;
}

.wb-strip {
  height: 24px;
  display: flex;
  align-items: stretch;
  background: #202020;
  border-top: 1px solid #3a3a3a;
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 700;
}

.wb-target,
.wb-add,
.wb-ico {
  width: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
}

.wb-target svg,
.wb-add svg,
.wb-ico svg { width: 16px; height: 16px; display: block; }

.wb-target {
  transition: background 0.12s ease, filter 0.12s ease;
}

.wb-target.is-press {
  background: #0078d4;
  filter: brightness(1.12);
}

.wb-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 1px 4px 0;
}

.wb-tab {
  --tab: #888;
  min-width: 78px;
  height: 22px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: 4px 4px 0 0;
  background: #242528;
  color: color-mix(in srgb, var(--tab) 62%, #9a9a9a);
  position: relative;
}

.wb-tab.is-active {
  background: #2d2e32;
  color: var(--tab);
}

.wb-tab::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 1px;
  background: var(--tab);
  opacity: 0.45;
}

.wb-tab.is-active::after {
  left: 6px;
  right: 6px;
  opacity: 1;
}

.wb-spacer { flex: 1; }

.wb-modes {
  display: flex;
  align-items: center;
  margin-right: 2px;
  padding: 2px;
  gap: 1px;
  background: #181818;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  align-self: center;
  height: 20px;
}

.wb-mode {
  width: 22px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 3px;
}

.wb-mode svg { width: 13px; height: 13px; }

.wb-mode.is-on { background: #0078d4; }
.wb-mode.is-on svg * { stroke: #fff; fill: #fff; }

.ff {
  --tab: #0078d4;
  position: absolute;
  top: 0;
  width: 310px;
  height: 174px;
  background: #1c1c1c;
  border: 1px solid #4a4a4a;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(8px);
  pointer-events: none;
  z-index: 0;
  transition:
    left 0.38s cubic-bezier(.22, .82, .2, 1),
    opacity 0.28s ease,
    transform 0.38s cubic-bezier(.22, .82, .2, 1),
    visibility 0s linear 0.28s;
}

.ff.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    left 0.38s cubic-bezier(.22, .82, .2, 1),
    opacity 0.28s ease,
    transform 0.38s cubic-bezier(.22, .82, .2, 1),
    visibility 0s linear 0s;
}

.ff.is-enter {
  opacity: 0;
  transform: scale(0.78) translateY(-18px);
}

.ff.is-front {
  border: 2px solid var(--tab);
  z-index: 2;
}

.ff.is-front::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--tab);
  z-index: 3;
}

.mini {
  position: absolute;
  inset: 2px;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1b1b1b;
  font-size: 11px;
  overflow: hidden;
}

.mini-tb {
  height: 22px;
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 0 7px;
  background: #f3f3f3;
  border-bottom: 1px solid #e4e4e4;
  font-weight: 650;
  font-size: 10.5px;
}

.mini-tb i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 12px;
  background: var(--tab);
}

.mini-tb span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-tb b {
  display: flex;
  font-weight: 400;
  color: #555;
  letter-spacing: 4px;
  padding: 0 8px;
  font-size: 10px;
}

.mini--excel .mini-tb { background: #217346; color: #fff; border-bottom-color: #1a5c38; }
.mini--excel .mini-tb i { background: #fff; }
.mini--excel .mini-tb b { color: #e8f6ee; }

.xl-ribbon {
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: #f3f3f3;
  color: #444;
  font-size: 9.5px;
  border-bottom: 1px solid #e6e6e6;
}

.xl-ribbon em {
  font-style: normal;
  color: #217346;
  font-weight: 700;
}

.xl-fx {
  height: 16px;
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 9.5px;
  color: #555;
  border-bottom: 1px solid #ececec;
}

.xl-fx b { color: #217346; font-size: 9px; }

.xl {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9.5px;
}

.xl th,
.xl td {
  border: 1px solid #d9e2d9;
  padding: 3px 5px;
  overflow: hidden;
  white-space: nowrap;
}

.xl thead th,
.xl tbody th {
  background: #eef6f1;
  color: #3d5c4a;
  font-weight: 650;
  text-align: center;
  width: 28px;
}

.xl td.on { background: #c6efce; outline: 1px solid #217346; }

.mini--mail .mini-tb { background: #eaf4fc; }

.mail-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.mail-side {
  width: 72px;
  flex: 0 0 72px;
  background: #f7f7f8;
  border-right: 1px solid #ececec;
  padding: 6px;
  font-size: 9.5px;
  color: #555;
}

.mail-side .on { background: #cfe8fc; color: #0b5cab; font-weight: 650; border-radius: 3px; padding: 3px 5px; }
.mail-side div { padding: 3px 5px; }

.mail-rows { flex: 1; min-width: 0; }

.mrow {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.mrow.on { background: #cfe8fc; }

.av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.mrow .who { font-weight: 650; font-size: 10px; }
.mrow .sub { color: #333; font-size: 9.5px; line-height: 1.2; }
.mrow .when { color: #777; font-size: 9px; }

.msg {
  flex: 1;
  min-height: 0;
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.4;
  color: #333;
}

.msg h4 { margin: 0 0 4px; font-size: 12px; }
.msg .meta { color: #777; font-size: 9px; margin-bottom: 8px; }
.msg p { margin: 0 0 6px; }

.layer-windows { z-index: 2; }

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: #1b1b1b;
  font-size: 12px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 0, 0, 0.14);
  left: 210px;
  top: 350px;
  width: 700px;
  height: 372px;
  z-index: 8;
  transition: box-shadow 0.2s ease;
}

.win.is-hot {
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.48),
    0 0 0 2px #4cc2ff,
    0 0 0 6px rgba(76, 194, 255, 0.28);
}

.win-titlebar {
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 0 10px;
  background: #217346;
  color: #fff;
  border-bottom: 1px solid #1a5c38;
}

.win-titlebar .app-mark {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #fff;
  color: #217346;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.win-titlebar .title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-controls {
  display: flex;
  height: 100%;
}

.win-controls i {
  width: 46px;
  height: 32px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  color: #e8f6ee;
}

.win-controls i.close { font-size: 14px; }

.win--excel .xl-ribbon {
  height: 22px;
  flex: 0 0 22px;
  font-size: 11px;
  gap: 12px;
  padding: 0 12px;
}

.win--excel .xl-fx {
  height: 22px;
  flex: 0 0 22px;
  font-size: 11px;
  gap: 8px;
}

.xl-fx__box {
  flex: 1;
  height: 16px;
  border: 1px solid #d9e2d9;
  border-radius: 2px;
  background: #fff;
  padding: 0 6px;
  display: flex;
  align-items: center;
}

.win-body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: #fff;
}

.win--excel .xl {
  font-size: 11px;
}

.win--excel .xl th,
.win--excel .xl td {
  padding: 5px 7px;
}

.win-aim {
  position: absolute;
  inset: 0;
  border: 2px dashed #4cc2ff;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  background: rgba(76, 194, 255, 0.07);
  transition: opacity 0.18s ease;
}

.win.is-hot .win-aim { opacity: 1; }

.drag-ghost {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 42;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.drag-ghost__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #202020;
  border: 1px solid #5a5a5a;
  display: grid;
  place-items: center;
}

.drag-ghost__icon svg { width: 20px; height: 20px; display: block; }

.drop-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 43;
  min-width: 148px;
  padding: 7px 10px;
  background: #1f1f1f;
  color: #f3f3f3;
  border: 1px solid #3f3f3f;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  white-space: nowrap;
  will-change: transform;
}

.drop-tip b {
  display: block;
  font-size: 10px;
  color: #9ad0f5;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.drop-tip span { color: #ececec; }

.tab-menu {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 45;
  width: 196px;
  padding: 8px;
  background: #282828;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92);
  transform-origin: 12px 8px;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(.22, .82, .2, 1), visibility 0s linear 0.16s;
}

.tab-menu.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(.22, .82, .2, 1), visibility 0s linear 0s;
}

.tab-pick {
  --tab: #888;
  height: 34px;
  border-radius: 6px;
  background: var(--tab);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--tab) 62%, #000);
  transition: filter 0.12s ease, outline-color 0.12s ease;
}

.tab-pick[data-tab="fileex"] { color: #3a2410; }

.tab-pick.is-hot {
  filter: brightness(1.14);
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 50;
  width: 28px;
  height: 28px;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.cursor.is-click svg {
  transform: scale(0.86);
  transform-origin: 4px 3px;
}
