/* Hide admin-only elements until auth resolves */
[data-admin] { display: none; }
html.mwd-admin [data-admin] { display: revert; }

/* ── Sidebar Background ── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left-pad);
  height: 100vh;
  background: #000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: var(--page-pad) 0 calc(var(--page-pad) - 20px) var(--page-pad);
  overflow: hidden;
}

/* ── Page Header ── */
#page-header {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  width: calc(var(--left-pad) - var(--page-pad));
}

#page-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 1px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

#page-subtitle-main {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-family: var(--font-mono);
  line-height: 1.2;
  margin-top: 2px;
  margin-bottom: 0;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  width: calc(100% - 40px);
}

/* ── Controls ── */
#controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}



#page-header::-webkit-scrollbar { display: none; }

/* ── Auth ── */
#sidebar-auth {
  display: block;
  padding: 8px 0;
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  font-family: var(--font-body);
  color: #fff;
}

/* ── Feedback link ── */
#feedback-link {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 4px 0 8px;
}
#feedback-link:hover { color: #fff; }
html.light #feedback-link { color: rgba(0,0,0,0.70); }
html.light #feedback-link:hover { color: #000; }

/* ── Sidebar Links ── */
#sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -4px;
}

#sidebar-links a {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

#sidebar-links a:hover,
#sidebar-links a.active {
  color: #fff;
}

#sidebar-links a.sidebar-sub {
  padding-left: 10px;
  font-size: 9px;
  opacity: 0.7;
}

.sidebar-section-label {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

#sidebar-theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  margin-top: 10px;
}

#sidebar-theme-toggle:hover {
  color: #fff;
}

#footer-divider {
  width: calc(100% - 40px);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0;
}

/* ── Page Footer ── */
#page-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  width: calc(var(--left-pad) - var(--page-pad));
  flex-shrink: 0;
  padding-top: 16px;
}

#dali-logo {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: -40px;
  margin-top: -60px;
}

#rti-text {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 8px;
  margin-top: -11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#csim-text {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
}

#upf-logo {
  height: 40px;
  width: auto;
}

/* ── Light Mode ── */
html.light #sidebar                          { background: #fff; }
html.light #page-title                       { color: #111; }
html.light #page-subtitle-main               { color: rgba(0,0,0,0.75); border-bottom-color: rgba(0,0,0,0.15); }
html.light #sidebar-auth                     { color: #111; }
html.light .sidebar-login-link               { color: #111; }
.sidebar-login-link { color: #fff; text-decoration: none; font-weight: 600; }
html.light #sidebar-links a                  { color: rgba(0,0,0,0.70); }
html.light #sidebar-links a:hover,
html.light #sidebar-links a.active           { color: #000; }
html.light .sidebar-section-label            { color: rgba(0,0,0,0.40); }
html.light #sidebar-theme-toggle             { color: rgba(0,0,0,0.45); }
html.light #sidebar-theme-toggle:hover       { color: #000; }
html.light #footer-divider                   { border-top-color: rgba(0,0,0,0.15); }
html.light #rti-text                         { color: rgba(0,0,0,0.45); }
html.light #csim-text                        { color: #111; }
html.light #dali-logo                        { filter: invert(1); mix-blend-mode: multiply; }
html.light #upf-logo                         { filter: invert(1); }

/* ── Responsive ── */
@media (max-width: 1200px) {
  #dali-logo {
    width: 150px;
    margin-bottom: -30px;
    margin-top: -50px;
  }
}

@media (max-width: 1024px) {
  #dali-logo {
    width: 120px;
    margin-bottom: -20px;
    margin-top: -35px;
  }
}

@media (max-width: 768px) {
  #page-title {
    font-size: 12px;
  }

  #page-subtitle-main {
    font-size: 10px;
  }

  #dali-logo {
    width: 90px;
    margin-bottom: -15px;
    margin-top: -25px;
  }

  #upf-logo {
    height: 30px;
  }

  #page-footer {
    gap: 14px;
  }

  #csim-text {
    font-size: 12px;
  }

  #rti-text {
    font-size: 9px;
    margin-top: -8px;
  }

}

@media (max-width: 480px) {
  #page-title {
    font-size: 10px;
  }

  #page-subtitle-main {
    font-size: 9px;
  }

  #dali-logo {
    width: 70px;
    margin-bottom: -10px;
    margin-top: -18px;
  }

  #upf-logo {
    height: 24px;
  }

  #page-footer {
    gap: 10px;
  }

  #csim-text {
    font-size: 10px;
  }

  #rti-text {
    font-size: 8px;
    margin-top: -6px;
  }

}
