/**
 * Team Overview card shell (Attendance Board — Today / .ov.bd-surface).
 * Link from Attendance_Board.html, tracker iframes, and shared module CSS.
 */
:root {
  --bd-surface-accent: var(--or, #f5a623);
}

.bd-surface {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, #070b11 52%, #05070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 5px 0 0 0 rgba(245, 166, 35, 0.9),
    0 4px 28px rgba(0, 0, 0, 0.38);
}

.bd-surface--pad {
  padding: 16px 18px 18px;
}

.bd-surface--fill {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.bd-iframe-root {
  min-height: 100vh;
  padding: 10px 12px 14px;
  box-sizing: border-box;
}

.bd-surface.bd-surface--grow {
  min-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

html.light-mode .bd-surface {
  background: linear-gradient(165deg, #f8fafc 0%, #e8eef5 50%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 5px 0 0 var(--bd-surface-accent),
    0 6px 24px rgba(15, 23, 42, 0.08);
}

/* PD/RD (.shell), Settings (.settings-layout): card chrome on direct child of #app */
body.bd-embed-app #app > .shell,
body.bd-embed-app #app > .settings-layout {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, #070b11 52%, #05070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 5px 0 0 0 rgba(245, 166, 35, 0.9),
    0 4px 28px rgba(0, 0, 0, 0.38);
  height: calc(100vh - 16px) !important;
  max-height: calc(100vh - 16px) !important;
  margin: 8px;
  box-sizing: border-box;
}

html.light-mode body.bd-embed-app #app > .shell,
html.light-mode body.bd-embed-app #app > .settings-layout {
  background: linear-gradient(165deg, #f8fafc 0%, #e8eef5 50%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 5px 0 0 var(--bd-surface-accent),
    0 6px 24px rgba(15, 23, 42, 0.08);
}

/* Shaavir Live: narrower centered card */
body.bd-embed-app #app > #slShell {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, #070b11 52%, #05070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 5px 0 0 0 rgba(245, 166, 35, 0.9),
    0 4px 28px rgba(0, 0, 0, 0.38);
  flex: 1;
  min-height: 0;
  height: auto !important;
  max-height: calc(100vh - 16px) !important;
  width: calc(100% - 16px) !important;
  max-width: 920px !important;
  margin: 8px auto !important;
  box-sizing: border-box;
}

html.light-mode body.bd-embed-app #app > #slShell {
  background: linear-gradient(165deg, #f8fafc 0%, #e8eef5 50%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 5px 0 0 var(--bd-surface-accent),
    0 6px 24px rgba(15, 23, 42, 0.08);
}

/* Client tracker & FileHub: root #app */
body.bd-embed-app #app {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, #070b11 52%, #05070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 5px 0 0 0 rgba(245, 166, 35, 0.9),
    0 4px 28px rgba(0, 0, 0, 0.38);
  min-height: calc(100vh - 16px);
  margin: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

html.light-mode body.bd-embed-app #app {
  background: linear-gradient(165deg, #f8fafc 0%, #e8eef5 50%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 5px 0 0 var(--bd-surface-accent),
    0 6px 24px rgba(15, 23, 42, 0.08);
}

/* Shell / settings-layout: #app is pass-through */
body.bd-embed-app:has(#app > .shell) #app,
body.bd-embed-app:has(#app > .settings-layout) #app {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 100vh;
  margin: 0 !important;
  display: block;
  overflow: visible;
}

/* Live: keep #app flex column for feed layout */
body.bd-embed-app:has(#app > #slShell) #app {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 100vh;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
