.smart-board-mode:not(.d-none) .page-content {
  height: 100%;
  padding: 8px;
  overflow: hidden;
  background: #eafbfc;
}

#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) > .topbar,
#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .sidebar { display: none !important; }
#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .app-layout { display: contents; }
#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .page-content { grid-column: 1; grid-row: 1; height: 100dvh; padding: 0; }
#appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .smart-board-screen { height: 100dvh; border-radius: 0; }

.smart-board-screen {
  --sb-deep: #075b58;
  --sb-main: #0b8780;
  --sb-bright: #16b7ac;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 82px minmax(0,1fr);
  overflow: hidden;
  color: #073a49;
  background: radial-gradient(circle at 65% 20%,rgba(255,255,255,.9),transparent 35%),linear-gradient(135deg,#f2fdfe,#dff6f8);
}

.smart-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  border-bottom: 1px solid rgba(14,95,89,.08);
  border-radius: 0 0 22px 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 18px rgba(6,46,43,.04);
}
.smart-board-title,.smart-board-brand { display: flex; align-items: center; gap: 14px; }
.smart-board-title > button { width: 54px; height: 54px; display: grid; place-items: center; border: 0; border-radius: 14px; background: linear-gradient(135deg,var(--sb-main),var(--sb-deep)); color: #fff; font-size: 26px; box-shadow: 0 8px 18px rgba(11,135,128,.2); }
.smart-board-title h1 { margin: 0; color: var(--sb-deep); font-size: 21px; font-weight: 900; }
.smart-board-title p { margin: 3px 0 0; color: #348689; font-size: 13px; font-weight: 700; }
.smart-board-brand img { width: 58px; height: 48px; object-fit: contain; }
.smart-board-brand div { display: grid; text-align: right; }
.smart-board-brand b { color: var(--sb-deep); font-size: 21px; line-height: 1; }
.smart-board-brand small { margin-top: 5px; color: #313695; font-size: 9px; font-weight: 900; letter-spacing: 2px; }

.smart-board-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0,1fr) 112px;
  grid-template-rows: 68px minmax(0,1fr) 70px;
  gap: 10px 16px;
  padding: 14px 26px 16px;
}
.smart-board-sidebar { grid-column: 1; grid-row: 1 / 3; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow: visible; }
.smart-board-filter {
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border: 1px solid #cce8ea;
  border-radius: 14px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 6px 16px rgba(7,91,88,.06);
}
.smart-board-filter > i:first-child { color: var(--sb-main); font-size: 30px; }
.smart-board-filter > div { min-width: 0; display: grid; }
.smart-board-filter b { color: #244352; font-size: 13px; }
.smart-board-filter .library-select-picker { position: relative; min-width: 0; margin-top: 2px; }
.smart-board-filter .library-select-search { width: 100%; height: 30px; padding: 2px 27px 2px 0; overflow: hidden; border: 0; outline: 0; background: transparent; color: #092c59; font: inherit; font-size: 17px; text-overflow: ellipsis; }
.smart-board-filter .library-select-toggle { position: absolute; top: 0; right: 0; width: 27px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--sb-deep); }
.smart-board-filter .library-select-menu { position: absolute; z-index: 80; top: calc(100% + 8px); left: -10px; right: -10px; display: none; max-height: 210px; padding: 6px; overflow-y: auto; border: 1px solid #cce5e5; border-radius: 11px; background: #fff; box-shadow: 0 12px 28px rgba(6,46,43,.16); }
.smart-board-filter .library-select-menu.show { display: grid; }
.smart-board-filter .library-select-menu button { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #21494e; font-size: 12px; font-weight: 750; text-align: left; }
.smart-board-filter .library-select-menu button:hover,
.smart-board-filter .library-select-menu button[aria-selected="true"] { background: #dff7f4; color: #0e5f59; }
.smart-board-filter .library-select-empty { padding: 9px; color: #7c8a88; font-size: 11px; }

.smart-board-book-list { min-height: 0; overflow-y: auto; border: 1px solid #d4eaec; border-radius: 14px; background: rgba(255,255,255,.82); scrollbar-width: thin; scrollbar-color: #8fc9c7 transparent; }
.smart-board-book-list button { width: 100%; min-height: 61px; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 9px; padding: 10px 17px; border: 0; border-bottom: 1px solid #dcecee; background: transparent; color: #123559; font-size: 14px; font-weight: 800; text-align: left; }
.smart-board-book-list button:last-child { border-bottom: 0; }
.smart-board-book-list button i { color: var(--sb-main); font-size: 21px; }
.smart-board-book-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-board-book-list button:hover { background: #effafa; }
.smart-board-book-list button.active { background: linear-gradient(135deg,var(--sb-main),#07968d); color: #fff; }
.smart-board-book-list button.active i { color: #fff; }

.smart-board-tabs { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(4,minmax(130px,200px)); justify-content: start; gap: 16px; }
.smart-board-tabs button { position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; border: 1px solid rgba(14,95,89,.04); border-radius: 14px; background: rgba(255,255,255,.85); color: #07545a; font-size: 15px; font-weight: 850; box-shadow: 0 6px 15px rgba(7,91,88,.05); }
.smart-board-tabs button i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #e1f4f3; color: var(--sb-main); font-size: 20px; }
.smart-board-tabs button em { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; background: #e1f4f3; color: var(--sb-deep); font-size: 9px; font-style: normal; }
.smart-board-tabs button.active { background: linear-gradient(135deg,#13a79d,#00867e); color: #fff; box-shadow: 0 9px 20px rgba(11,135,128,.2); }
.smart-board-tabs button.active i { background: rgba(5,73,69,.45); color: #fff; }
.smart-board-tabs button.active em { background: #fff; }

.smart-board-stage { grid-column: 2; grid-row: 2; position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; border: 8px solid rgba(255,255,255,.7); border-radius: 15px; background: #eaf7f8; box-shadow: inset 0 0 0 1px #cce7e9,0 9px 23px rgba(7,91,88,.08); }
.smart-board-stage.is-zoomed { place-items: start center; overflow: auto; }
.smart-board-stage.is-zoomed .smart-board-spread { width: max-content; min-width: 100%; }
.smart-board-stage.is-zoomed .smart-board-page { max-width: none; }
.smart-board-spread { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 0; padding: 12px 54px; }
.smart-board-page { position: relative; max-width: 50%; max-height: 100%; display: grid; place-items: center; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(9,51,63,.12); }
.smart-board-page[data-side="left"] { border-radius: 8px 0 0 8px; }
.smart-board-page[data-side="right"] { border-radius: 0 8px 8px 0; }
.smart-board-page canvas { display: block; max-width: 100%; max-height: 100%; background: #fff; }
.smart-board-page.is-empty { aspect-ratio: .72; height: 94%; background: linear-gradient(90deg,#f8faf9,#fff); }
.smart-board-book-gutter { position: absolute; z-index: 4; left: 50%; top: 4%; bottom: 4%; width: 18px; pointer-events: none; background: linear-gradient(90deg,transparent,rgba(35,72,78,.13),rgba(255,255,255,.65),rgba(35,72,78,.12),transparent); transform: translateX(-50%); }
.smart-board-page-arrow { position: absolute; z-index: 7; top: 50%; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #005c66; font-size: 25px; box-shadow: 0 8px 18px rgba(7,91,88,.13); transform: translateY(-50%); }
.smart-board-page-arrow.previous { left: 7px; }.smart-board-page-arrow.next { right: 7px; }
.smart-board-page-arrow:disabled { opacity: .3; }
.smart-board-hotspots { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.smart-board-hotspots button { position: absolute; width: 40px; height: 40px; display: grid; place-items: center; padding: 5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 5px 14px rgba(6,46,43,.2); transform: translate(-50%,-50%); pointer-events: auto; }
.smart-board-hotspots button img { width: 100%; height: 100%; object-fit: contain; }

.smart-board-thumbnails { grid-column: 3; grid-row: 1 / 3; min-height: 0; display: grid; align-content: start; gap: 9px; padding: 10px 8px; overflow-y: auto; border-radius: 13px; background: rgba(255,255,255,.55); scrollbar-width: thin; }
.smart-board-thumbnail { display: grid; gap: 4px; padding: 5px; border: 2px solid transparent; border-radius: 9px; background: transparent; color: #285164; font-size: 10px; font-weight: 900; }
.smart-board-thumbnail canvas { width: 100%; max-height: 112px; object-fit: contain; border: 1px solid #d3e7e8; border-radius: 5px; background: #fff; box-shadow: 0 4px 9px rgba(7,91,88,.06); }
.smart-board-thumbnail.active { border-color: var(--sb-main); background: #e1f5f3; }

.smart-board-loading,.smart-board-empty { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 11px; background: rgba(240,251,251,.94); color: var(--sb-deep); }
.smart-board-loading span { color: var(--sb-main); }.smart-board-loading b { font-size: 13px; }
.smart-board-empty i { font-size: 46px; color: #68aaa8; }.smart-board-empty b { font-size: 16px; }.smart-board-empty span { color: #668389; font-size: 11px; }

.smart-board-resource-view { width: 100%; height: 100%; padding: 22px; overflow-y: auto; }
.smart-board-resource-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.smart-board-resource-heading i { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; background: #dff7f4; color: var(--sb-main); font-size: 22px; }
.smart-board-resource-heading h2 { margin: 0; color: var(--sb-deep); font-size: 19px; }.smart-board-resource-heading p { margin: 3px 0 0; color: #668389; font-size: 11px; }
.smart-board-resource-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.smart-board-resource-card { min-height: 120px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 11px; padding: 14px; border: 1px solid #d5e9e9; border-radius: 14px; background: #fff; color: #14394c; text-align: left; box-shadow: 0 6px 15px rgba(7,91,88,.06); }
.smart-board-resource-card > i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #dff7f4; color: var(--sb-main); font-size: 20px; }
.smart-board-resource-card b,.smart-board-resource-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.smart-board-resource-card small { margin-top: 5px; color: #779096; font-size: 9px; }
.smart-board-resource-card:hover { border-color: var(--sb-bright); transform: translateY(-2px); }

.smart-board-footer { grid-column: 1 / 4; grid-row: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.smart-board-screen.resource-mode #smartBoardFit,
.smart-board-screen.resource-mode .smart-board-page-controls { visibility: hidden; }
.smart-board-footer-button { width: fit-content; min-height: 49px; display: flex; align-items: center; gap: 9px; padding: 9px 20px; border: 1px solid #d1e7e8; border-radius: 13px; background: rgba(255,255,255,.9); color: #07575d; font-size: 13px; font-weight: 850; box-shadow: 0 6px 14px rgba(7,91,88,.06); }
#smartBoardFullscreen { justify-self: end; }
.smart-board-page-controls { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.78); }
.smart-board-page-controls span { min-width: 76px; padding: 8px 14px; border-radius: 999px; background: #d9f1f3; color: #073b55; font-size: 14px; font-weight: 900; text-align: center; }
.smart-board-page-controls button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--sb-main); font-size: 18px; }
.smart-board-page-controls b { min-width: 44px; color: #466c70; font-size: 10px; text-align: center; }

@media (max-width:1150px) {
  .smart-board-workspace { grid-template-columns: 245px minmax(0,1fr) 88px; padding-inline: 14px; }
  .smart-board-tabs { gap: 8px; grid-template-columns: repeat(4,minmax(110px,1fr)); }
  .smart-board-tabs button { gap: 7px; padding-inline: 9px; font-size: 12px; }
  .smart-board-filter { min-height: 72px; grid-template-columns: 40px minmax(0,1fr); padding-inline: 12px; }
  .smart-board-filter > i:first-child { font-size: 25px; }
  .smart-board-resource-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width:800px) {
  .smart-board-mode:not(.d-none) .page-content { overflow-y: auto; }
  .smart-board-screen { height: auto; min-height: 100dvh; grid-template-rows: 70px auto; overflow: visible; }
  .smart-board-header { padding: 8px 13px; border-radius: 0 0 15px 15px; }
  .smart-board-title > button { width: 44px; height: 44px; font-size: 21px; }.smart-board-title h1 { font-size: 16px; }.smart-board-title p { font-size: 10px; }
  .smart-board-brand div { display: none; }.smart-board-brand img { width: 52px; }
  .smart-board-workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(430px,65vh) auto; gap: 10px; padding: 10px; }
  .smart-board-sidebar { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; }
  .smart-board-filter { min-height: 65px; grid-template-columns: 32px minmax(0,1fr); }.smart-board-filter > i:first-child { font-size: 20px; }.smart-board-filter b { font-size: 9px; }.smart-board-filter .library-select-search { font-size: 12px; }
  .smart-board-book-list { grid-column: 1 / 4; display: flex; overflow-x: auto; }.smart-board-book-list button { min-width: 150px; border-right: 1px solid #dcecee; border-bottom: 0; }
  .smart-board-tabs { grid-column: 1; grid-row: 2; overflow-x: auto; grid-template-columns: repeat(4,minmax(125px,1fr)); }
  .smart-board-stage { grid-column: 1; grid-row: 3; }
  .smart-board-thumbnails { display: none; }
  .smart-board-footer { grid-column: 1; grid-row: 4; }
  .smart-board-spread { padding-inline: 40px; }
  #appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .page-content { height: 100dvh; overflow: hidden; }
  #appShell.smart-board-mode.smart-board-fullscreen:not(.d-none) .smart-board-screen { height: 100dvh; min-height: 0; overflow: hidden; }
}

@media (max-width:520px) {
  .smart-board-sidebar { grid-template-columns: 1fr; }.smart-board-book-list { grid-column: 1; }
  .smart-board-filter:nth-child(2),.smart-board-filter:nth-child(3) { min-height: 58px; }
  .smart-board-stage { min-height: 390px; }
  .smart-board-footer-button span { display: none; }.smart-board-footer-button { width: 46px; justify-content: center; padding: 8px; }
  .smart-board-page-controls b { display: none; }.smart-board-page-controls span { min-width: 63px; padding-inline: 9px; }
  .smart-board-resource-grid { grid-template-columns: 1fr; }
}
