/* RuangKerja V2 shell only. Content modules are styled separately. */
.app[data-theme="ruangkerja-v2"] {
  height: 100vh;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.app[data-theme="ruangkerja-v2"] .maya-v2-shell {
  height: 100vh;
  min-height: 0;
  color: var(--maya-v2-text);
  background: var(--maya-v2-bg);
}

.maya-v2-header {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  width: auto !important;
  height: var(--maya-v2-header);
  margin: 0 !important;
  border-bottom: 1px solid var(--maya-v2-border);
}

.maya-v2-header .maya-v2-account-logo { display: none; }
.maya-v2-header .maya-v2-tenant-switcher { min-width: 0 !important; height: 34px; display: inline-flex; align-items: center; gap: 7px; margin: 11px 0 0 8px; padding: 0 9px 0 5px; border-radius: 7px; color: #fff !important; background: rgba(0, 0, 0, .16); font-size: 13px !important; line-height: 1; text-decoration: none; }
.maya-v2-header .maya-v2-tenant-switcher:hover { background: rgba(0, 0, 0, .23); }
.maya-v2-header .maya-v2-tenant-switcher img { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 6px; object-fit: cover; }
.maya-v2-header .maya-v2-tenant-switcher p { max-width: 125px; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.maya-v2-header .maya-v2-tenant-switcher i { margin: 0 0 0 2px !important; color: rgba(255, 255, 255, .82); font-size: 12px !important; }
.maya-v2-header-actions { display: flex; align-items: center; height: var(--maya-v2-header); }
.maya-v2-language-switcher { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 52px; height: 32px; margin: 0 4px 0 0; padding: 0 8px; border-radius: 7px; color: rgba(255,255,255,.95); background: rgba(0,0,0,.14); font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1; text-decoration: none; }
.maya-v2-language-switcher:hover,.maya-v2-language-switcher:focus { color: #fff; background: rgba(0,0,0,.24); text-decoration: none; outline: 0; }
.maya-v2-language-switcher .fa-globe { font-size: 13px; }
.maya-v2-language-switcher .fa-angle-down { color: rgba(255,255,255,.72); font-size: 11px; }
.maya-v2-language-menu { min-width: 172px; margin-top: 2px; }
.maya-v2-language-menu > li > a { display: flex; align-items: center; gap: 8px; padding: 9px 13px; }
.maya-v2-language-menu .fa-check { width: 12px; color: #6654dd; }
.maya-v2-tenant-drawer { top: var(--maya-v2-header) !important; height: calc(100vh - var(--maya-v2-header)) !important; }

.maya-v2-rail {
  position: fixed;
  top: calc(var(--maya-v2-header) + 10px);
  bottom: 10px;
  left: 10px;
  z-index: 110;
  width: calc(var(--maya-v2-rail) - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 5px;
  border-radius: 12px;
  background: var(--maya-v2-rail-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
}

.maya-v2-brand {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #7565ee, #3d83df);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.maya-v2-rail-bottom { margin-top: auto; }
.maya-v2-rail a { color: var(--maya-v2-rail-text); text-decoration: none; }
.maya-v2-rail a:hover { color: #fff; }

.maya-v2-workspace-frame {
  position: fixed;
  top: calc(var(--maya-v2-header) + 8px);
  right: 8px;
  bottom: 10px;
  left: calc(var(--maya-v2-rail) - 4px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid var(--maya-v2-border);
  border-radius: 10px;
  background: var(--maya-v2-surface);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.maya-v2-horizontal-subnav { position: relative; top: auto; right: auto; left: auto; z-index: 2; flex: 0 0 var(--maya-v2-subnav); height: var(--maya-v2-subnav); border-bottom: 1px solid var(--maya-v2-border); border-radius: 9px 9px 0 0; background: var(--maya-v2-surface); }
.maya-v2-horizontal-subnav-body { height: 100%; overflow: visible; }

.maya-v2-content {
  position: relative !important;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  margin: 0 !important;
  padding: 0;
  overflow: hidden;
  border-radius: 0 0 9px 9px;
  background: var(--maya-v2-bg);
}

/* MY workspace has no horizontal submenu above the content, so the content owns the frame's top corners. */
.maya-v2-my-shell .maya-v2-content { border-radius: 9px; }

.maya-v2-content > #content,
.maya-v2-content > #content.app-content {
  position: relative !important;
  display: flex !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  flex: none !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

.maya-v2-content > .maya-v2-page,
.maya-v2-content .maya-v2-page {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

@media (max-width: 760px) {
  :root { --maya-v2-rail: 64px; }
  .maya-v2-header { z-index: 150; }
  .maya-v2-workspace-frame { top: var(--maya-v2-header); right: 0; bottom: 59px; left: 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; }
  .maya-v2-horizontal-subnav { top: auto; left: auto; }
  .maya-v2-content { border-radius: 0; }
  .maya-v2-content > .maya-v2-page,
  .maya-v2-content .maya-v2-page { height: 100%; }
  .maya-v2-rail { top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 59px; flex-direction: row; justify-content: center; border-radius: 0; box-shadow: 0 -2px 8px rgba(15, 23, 42, .12); }
  .maya-v2-brand { display: none; }
  .maya-v2-rail-bottom { flex: 0 0 58px; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; margin: 0; background: var(--maya-v2-rail-bg); }
}
