.app-shell {
  background: #f4f7fb;
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}
.app-sidebar {
  background:
    linear-gradient(180deg, rgba(40, 169, 129, 0.14), transparent 220px),
    #102238;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 34px rgba(15, 31, 47, 0.14);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  transition: width 0.24s ease;
  width: var(--sidebar-width);
  z-index: 30;
}
.app-sidebar-edge-toggle {
  align-items: center;
  background: rgba(18, 85, 69, 0.92);
  border: 1px solid rgba(121, 215, 189, 0.45);
  border-radius: 999px;
  box-shadow:
    0 12px 28px rgba(15, 31, 47, 0.22),
    0 0 0 6px rgba(40, 169, 129, 0.08);
  color: #f8fafc;
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 48px;
  z-index: 35;
}
.app-sidebar-edge-toggle:hover {
  background: #19735e;
  box-shadow:
    0 14px 32px rgba(15, 31, 47, 0.26),
    0 0 0 8px rgba(40, 169, 129, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.03);
}
.app-sidebar-edge-icon {
  line-height: 1;
}
.app-sidebar-edge-icon-expand {
  display: none;
}
.app-clock-sidebar-toggle {
  align-items: center;
  background: rgba(18, 85, 69, 0.92);
  border: 1px solid rgba(121, 215, 189, 0.45);
  border-radius: 999px;
  box-shadow:
    0 12px 28px rgba(15, 31, 47, 0.22),
    0 0 0 6px rgba(40, 169, 129, 0.08);
  color: #f8fafc;
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  left: 16px;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 48px;
  z-index: 60;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-toggle {
  left: calc(var(--sidebar-width) - 24px);
}
.app-clock-sidebar-toggle:hover {
  background: #19735e;
  box-shadow:
    0 14px 32px rgba(15, 31, 47, 0.26),
    0 0 0 8px rgba(40, 169, 129, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.03);
}
.app-clock-sidebar-icon-close {
  display: none;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-icon-open {
  display: none;
}
.app-clock-page .app-shell.clock-sidebar-open .app-clock-sidebar-icon-close {
  display: inline-block;
}
.app-clock-page .app-sidebar {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}
.app-clock-page .app-shell.clock-sidebar-open .app-sidebar {
  transform: translateX(0);
}
.app-clock-page .app-content-shell,
.app-clock-page .app-shell.sidebar-collapsed .app-content-shell {
  margin-left: 0;
  width: 100%;
}
.app-clock-page .app-sidebar-edge-toggle {
  display: none;
}
.app-sidebar-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  min-height: var(--topbar-height);
  padding: 0 18px;
}
.app-sidebar-brand-link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  gap: 10px;
  min-width: 0;
}
.app-sidebar-brand-link:hover {
  color: #fff;
}
.app-sidebar-brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease, width 0.18s ease;
  white-space: nowrap;
}
.app-sidebar-nav {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px;
}
.app-sidebar-link,
.app-sidebar-sublink {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(248, 250, 252, 0.78);
  display: flex;
  gap: 12px;
  min-height: 42px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  width: 100%;
}
.app-sidebar-link:hover,
.app-sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.app-sidebar-link.active,
.app-sidebar-sublink.active {
  background: rgba(40, 169, 129, 0.18);
  border-color: rgba(121, 215, 189, 0.28);
  color: #fff;
}
.app-sidebar-link i,
.app-sidebar-sublink i {
  flex: 0 0 24px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}
.app-sidebar-link span,
.app-sidebar-sublink span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-toggle {
  cursor: pointer;
  justify-content: space-between;
}
.app-sidebar-link-main {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  min-width: 0;
}
.app-sidebar-chevron {
  flex-basis: auto !important;
  font-size: 13px !important;
  transition: transform 0.18s ease;
}
.app-sidebar-toggle[aria-expanded="true"] .app-sidebar-chevron {
  transform: rotate(180deg);
}
.app-sidebar-submenu {
  background: rgba(3, 12, 22, 0.22);
  border-radius: 8px;
  margin: 2px 0 6px;
  padding: 4px;
}
.app-sidebar-sublink {
  font-size: 14px;
  min-height: 38px;
  padding-left: 14px;
}
.app-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 2px;
  padding: 10px 18px 14px;
}
.app-sidebar-focus-card {
  background:
    linear-gradient(145deg, rgba(40, 169, 129, 0.2), rgba(16, 34, 56, 0.82)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(121, 215, 189, 0.2);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 34px rgba(2, 6, 23, 0.18);
  color: #f8fafc;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 14px 14px 10px;
}
.app-sidebar-focus-card.hide-no-space {
  display: none !important;
}
.app-sidebar-focus-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.22;
}
.app-sidebar-focus-card p {
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.35;
}
.app-sidebar-focus-author {
  color: rgba(167, 243, 208, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.app-sidebar-focus-icon {
  align-items: center;
  background: rgba(121, 215, 189, 0.15);
  border: 1px solid rgba(121, 215, 189, 0.22);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.app-sidebar-focus-illustration {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 132px;
  opacity: 0.92;
  filter: drop-shadow(0 10px 16px rgba(2, 6, 23, 0.24));
  width: 78%;
}
.app-sidebar-build-info {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.app-sidebar-version-link {
  color: rgba(248, 250, 252, 0.52);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-version-link:hover {
  color: rgba(248, 250, 252, 0.86);
  text-decoration: underline;
}
.app-sidebar-environment {
  color: rgba(248, 250, 252, 0.48);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-content-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.24s ease;
  width: calc(100% - var(--sidebar-width));
}
.app-drawer-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  display: none;
  font-size: 22px;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}
.app-drawer-toggle:hover {
  background: rgba(15, 31, 47, 0.06);
}
.app-drawer-backdrop {
  background: rgba(8, 18, 30, 0.5);
  inset: 0;
  opacity: 0;
  position: fixed;
  transition: opacity 0.24s ease;
  z-index: 29;
}
.app-drawer-backdrop.is-visible {
  opacity: 1;
}
.app-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(15, 31, 47, 0.08);
  box-shadow: 0 10px 26px rgba(17, 31, 48, 0.06);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.app-user-toggle {
  align-items: center;
  color: #172033;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  max-width: min(360px, 44vw);
}
.app-user-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-user-toggle:hover {
  color: var(--accent);
}
.app-user-menu .dropdown-item {
  align-items: center;
  display: flex;
  min-height: 38px;
}
.app-logout-form {
  margin: 0;
}
.app-shell .app-main {
  flex: 1;
  max-width: none;
  padding: 28px 28px 18px;
  width: 100%;
}
.app-shell .app-main-clock {
  min-height: calc(100vh - var(--topbar-height));
  padding: 0;
}
.app-shell .app-main-clock .study-clock-screen {
  min-height: calc(100vh - var(--topbar-height));
}
.app-shell .app-main-clock .flip-card {
  min-width: clamp(54px, 8vw, 150px);
}
.app-shell .app-main-clock .flip-card-number {
  font-size: clamp(58px, 9vw, 165px);
}
.app-shell .app-main-clock .flip-separator {
  font-size: clamp(28px, 4vw, 72px);
}
.app-shell.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}
.app-shell.sidebar-collapsed .app-sidebar-edge-icon-collapse {
  display: none;
}
.app-shell.sidebar-collapsed .app-sidebar-edge-icon-expand {
  display: inline-block;
}
.app-shell.sidebar-collapsed .app-content-shell {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}
.app-shell.sidebar-collapsed .app-sidebar-brand {
  justify-content: center;
  padding-inline: 10px;
}
.app-shell.sidebar-collapsed .app-sidebar-brand-text,
.app-shell.sidebar-collapsed .app-sidebar-link span:not(.app-sidebar-link-main),
.app-shell.sidebar-collapsed .app-sidebar-link-main span,
.app-shell.sidebar-collapsed .app-sidebar-sublink span,
.app-shell.sidebar-collapsed .app-sidebar-chevron,
.app-shell.sidebar-collapsed .app-sidebar-focus-card,
.app-shell.sidebar-collapsed .app-sidebar-build-info {
  display: none !important;
}
.app-shell.sidebar-collapsed .app-sidebar-link,
.app-shell.sidebar-collapsed .app-sidebar-sublink {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.app-shell.sidebar-collapsed .app-sidebar-footer {
  padding: 0;
}
.app-shell.sidebar-collapsed .app-sidebar-link-main {
  justify-content: center;
}
.app-shell.sidebar-collapsed .app-sidebar-submenu {
  display: none !important;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
a:hover { color: var(--accent-strong); }
.topbar {
  background: rgba(11, 31, 47, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(15, 31, 47, 0.16);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.topbar.clock-nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.app-clock-page .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}
.app-clock-page .app-main-clock {
  min-height: 100vh;
}
.clock-nav-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(248, 250, 252, 0.5);
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.clock-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(248, 250, 252, 0.9);
}
.app-navbar {
  max-width: 1220px;
  min-height: 68px;
  padding-inline: 20px;
}
.topbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.topbar .navbar-toggler-icon { filter: invert(1) grayscale(1) brightness(2); }
.topbar .nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.topbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  margin: 0;
}
.brand:hover { color: #fff; }
.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #28a981, #79d7bd);
  border-radius: 8px;
  color: #082219;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.nav-logout { margin-left: 8px; }
.app-main {
  max-width: 1180px;
  padding: 32px 16px 18px;
}
.app-clock-page {
  background: #111315;
  overflow-x: hidden;
}
.app-main-clock {
  max-width: none;
  min-height: calc(100vh - 68px);
  padding: 0;
  width: 100%;
}
.app-clock-page .app-shell .app-main-clock {
  background: #111315;
  min-height: 100vh;
}
.app-clock-page .app-shell .study-clock-screen {
  min-height: 100vh;
}
