/* =========================================================
   DODÔ Ponto — layout: shell, sidebar, topbar, navigation
   ========================================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 26px 18px 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% -4%, rgba(242,106,27,.16), transparent 30%),
    linear-gradient(180deg, #0D0D0D 0%, #070707 100%);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(242,106,27,.35), transparent);
  opacity: .6;
}

.brand {
  position: relative;
  z-index: 2;
  margin: 0 4px 34px;
}
.brand-logo { width: 196px; height: auto; }
.brand-sub {
  margin: 10px 0 0 3px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .36em;
  color: rgba(255,255,255,.36);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  margin: 0 12px 9px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .22em;
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(255,255,255,.5);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.nav-item .icon { width: 19px; height: 19px; color: rgba(255,255,255,.36); transition: color .16s ease; }
.nav-item:hover { background: rgba(255,255,255,.055); color: rgba(255,255,255,.86); }
.nav-item:hover .icon { color: rgba(255,255,255,.7); }
.nav-item.active { background: rgba(242,106,27,.13); color: #fff; }
.nav-item.active .icon { color: var(--orange); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(242,106,27,.65);
}
.nav-index {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: rgba(255,255,255,.22);
}
.nav-item.active .nav-index { color: rgba(242,106,27,.75); }

.sidebar-spacer { flex: 1; min-height: 28px; }

.sidebar-card {
  position: relative;
  z-index: 2;
  margin: 0 2px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(8px);
}
.sidebar-card-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .17em;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.68);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #42D392;
  box-shadow: 0 0 0 4px rgba(66,211,146,.1);
  animation: pulseGreen 2.4s infinite;
}
@keyframes pulseGreen {
  0%,100% { box-shadow: 0 0 0 0 rgba(66,211,146,.3); }
  50% { box-shadow: 0 0 0 5px rgba(66,211,146,0); }
}
.sidebar-clock {
  margin-top: 13px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.055em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.sidebar-date {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,.34);
  text-transform: capitalize;
}

.sidebar-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 2px 0;
}
.install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(242,106,27,.28);
  border-radius: 9px;
  background: rgba(242,106,27,.08);
  color: #FFB98B;
  font-size: 10px;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease;
}
.install-btn:hover { background: rgba(242,106,27,.15); border-color: rgba(242,106,27,.5); }
.storage-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  color: rgba(255,255,255,.26);
  line-height: 1.4;
}
.storage-note .icon { width: 12px; height: 12px; }

/* Main column */
.main-column {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 28px 34px 0;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 {
  margin: 5px 0 5px;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 800;
  color: var(--ink);
}
.topbar-title h1 .accent { color: var(--orange); }
.topbar-title p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.topbar-brand { display: none; }

.employee-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 212px;
  max-width: 280px;
  padding: 5px 30px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20,20,20,.03);
}
.employee-picker .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 10px; }
.employee-picker-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.employee-picker-label {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 1px;
}
.employee-picker select {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  outline: none;
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.employee-picker > .icon {
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  color: var(--gray-400);
  pointer-events: none;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(242,106,27,.25);
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}
.demo-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }

.content {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 24px 34px 54px;
}
.page { display: none; animation: fadeUp .32s ease both; }
.page.active { display: block; }

/* Mobile bottom nav */
.bottom-nav { display: none; }

/* Small utility for topbar hide on mobile */
.mobile-only { display: none !important; }

@media (max-width: 1240px) {
  :root { --sidebar-w: 250px; }
  .topbar { padding: 24px 26px 0; }
  .content { padding: 22px 26px 48px; }
  .brand-logo { width: 178px; }
}

@media (max-width: 980px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 0 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow: visible;
  }
  .sidebar::before { mask-image: linear-gradient(90deg, #000, transparent 70%); }
  .brand { margin: 0; display: flex; align-items: center; gap: 10px; }
  .brand-logo { width: 128px; }
  .brand-sub { display: none; }
  .nav, .sidebar-card, .sidebar-spacer, .sidebar-footer { display: none; }
  .main-column { margin-left: 0; }
  .topbar { padding: 22px 22px 0; }
  .content { padding: 20px 22px 100px; }
  .mobile-only { display: inline-flex !important; }
  .bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 19px;
    background: rgba(10,10,10,.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 50px rgba(0,0,0,.28);
  }
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 64px;
    padding: 7px 12px;
    border-radius: 12px;
    color: rgba(255,255,255,.42);
    font-size: 8.5px;
    font-weight: 650;
    transition: color .16s ease, background .16s ease;
  }
  .bottom-nav button .icon { width: 20px; height: 20px; }
  .bottom-nav button.active { color: var(--orange); background: rgba(242,106,27,.11); }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    gap: 13px;
    padding: 18px 16px 0;
  }
  .topbar-title { flex: 1 1 auto; min-width: 0; }
  .topbar-title h1 { font-size: 23px; }
  .topbar-title p { display: none; }
  .topbar-actions { width: 100%; gap: 8px; }
  .employee-picker { flex: 1; max-width: none; min-width: 0; }
  .topbar-actions .btn-primary { flex: none; }
  .content { padding: 18px 16px 98px; }
  .sidebar { padding: 0 16px; }
  .brand-logo { width: 118px; }
  .bottom-nav { left: 10px; right: 10px; bottom: max(9px, env(safe-area-inset-bottom)); }
  .bottom-nav button { min-width: 56px; padding: 7px 9px; }
}
