.logo-container {
	text-align: center;
	padding: 20px 0;
}

.logo-container img {
	max-width: 200px; 
	height: auto;
}

:root {
	--SideBarButton: 5%;
	--SideBarHoverColor: #c28840;
	--SideBarTextColor: #e3e0cf;
	--MainColor: #1B1F1F;
	--BackGround: #1B1F1F;
	--SideBarWidth: 250px;
	--ToggleTop: 80px;
	--BottomBarHeight: 260px; /* ensure this variable exists */
}

body {
	background-color: var(--BackGround);
	color: #e3e0cf;
	font-family: Arial, sans-serif;
}

/* Text Boxes and Password Boxes */
input[type=text], input[type=password] {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

select {
	width: 200px;
	height: 30px;
	padding: 15px;
	text-align: center;
	background-color: #FFFFFF;
	border: 1px solid #ccc;
	border-radius: 4px;
}

/* Submit Buttons */
input[type=submit] {
    width: 100%;
    max-width: 400px;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
input[type=submit]:hover {
    background-color: var(--MainColor);
}

/* Page Footer */
.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  background-color: #f2f2f2;
}

/* Logo */
.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 70%;
  height: auto;
}

/* Sidebar Menu */
.sidenav {
  height: 100%;
  width: var(--SideBarWidth); 
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: var(--MainColor);
  overflow-x: hidden;
  transition: 1s;
  padding-top: 20px;
  box-sizing: border-box;
}
.sidenav.collapsed {
  width: var(--SideBarButton);
}
.sidenav .toggle-btn {
  position: fixed;
  top: var(--ToggleTop);
  left: var(--SideBarWidth); 
  background-color: var(--MainColor);
  color: white;
  padding: 10px 15px;
  font-size: 20px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  transition: left 1s ease;
  z-index: 1100;
}
.sidenav.collapsed .toggle-btn {
  left: var(--SideBarButton); /* Aligns next to collapsed menu */
}
.sidenav img {
  display: block;
  margin: 0 auto 10px auto;
  width: 80%;
  transition: 1s;
}
.sidenav.collapsed img {
  width: 30px;
}
.sidenav a::before {
  display: inline-block;
  margin-right: 10px;
  color: white;
}
.sidenav a {
  padding: 12px 16px;
  text-decoration: none;
  font-size: 16px;
  color: var(--SideBarTextColor);
  display: block;
  transition: font-size 1s ease, opacity 1s ease;
}
.sidenav a i {
  margin-right: 10px;
}
.sidenav a:hover {
  background-color: var(--SideBarHoverColor);
  color: var(--SideBarTextColor);
}
.sidenav.collapsed a {
  text-align: center;
  font-size: 0; /* Prevent text spacing issues */
}
.sidenav.collapsed a i {
  font-size: 18px; /* Ensure icons remain visible */
  display: block;
  margin-bottom: 5px;
  margin-right: 0; /* Center icon */
}
.sidenav.collapsed a span {
  display: none; /* Hide text label */
}
.sidenav.collapsed a::before {
  font-size: 16px;
  display: block;
  text-align: center;
}
.sidenav .user-info {
  color: var(--SideBarTextColor);
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
}
.no-transition * {
  transition: none !important;
}

/* Main Body Code */
.main {
	background-color: var(--BackGround);
	margin-left: var(--SideBarWidth);       /* UPDATED from 20% */
	max-width: calc(100% - var(--SideBarWidth)); /* UPDATED from 100% - 20% */
	font-size: 20px;
	padding: 0;                             /* OPTIONAL: remove padding so image sits flush */
	transition: margin-left 1s ease, max-width 1s ease;
}
.sidenav.collapsed ~ .main {
	margin-left: var(--SideBarButton);      /* keeps your collapsed behavior */
	max-width: calc(100% - var(--SideBarButton));
}

.sidenav.collapsed ~ .rv-root {
  left: var(--SideBarButton) !important;        /* your collapsed width (5%) */
}

/*Media Enhancements*/
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; z-index: 9999;
}
#lightbox.lb-hidden { display: none; }

#lightbox .lb-content {
  max-width: 90vw; max-height: 85vh; outline: none;
}
#lightbox img, #lightbox video {
  max-width: 100%; max-height: 85vh;
  display: block; border-radius: 8px;
}

#lightbox .lb-close {
  position: absolute; top: 12px; right: 12px;
  font-size: 28px; line-height: 1;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff; cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%;
}

.media-gallery img,
.media-gallery video { cursor: zoom-in; }

/* Optional: make your inline images responsive */
.media-gallery img, .media-gallery video { height: auto; max-width: 100%; }

/* Remote Viewer Page */
/* ===== Global resets ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; background: #000; }

/* ===== Root layout ===== */
.rv-root {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;         /* viewer on top, bar at bottom */
  background: #000;
  overflow: hidden;               /* block any layout overflow pushing things sideways */
  transition: none;
}

.rv-viewer {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  background: #000;

  /* Safari/Edge flex item safety: allow shrinking within flex column */
  min-height: 0;
  min-width: 0;
}

/* Image fits container */
#remoteImage {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: #000 !important;
}

/* Waiting overlay */
.rv-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #bbb;
  background: #000;
  font-size: clamp(16px, 3vw, 36px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

/* ===== Bottom panel: 3 equal columns ===== */
.rv-panel {
  flex: 0 0 var(--BottomBarHeight, 260px);
  height: var(--BottomBarHeight, 260px);
  width: 100%;
  max-width: 100vw;               /* don’t let it grow wider than viewport */
  min-width: 0;                   /* grid/flex overflow fix (Safari) */

  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* equal thirds */
  align-items: start;
  align-content: start;
  gap: 16px;

  border-top: 1px solid #2a3240;
  padding: 12px;
  background: #000;

  /* ensure it's treated as a bottom bar, not a sidebar, in quirky layouts */
  float: none !important;
  position: relative !important;
  inset: auto !important;
}

/* Form covers first two columns (left + middle) */
#rv-form {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr; /* left: credentials | right: buttons */
  gap: 16px;
  min-width: 0;
}

/* Typography */
.rv-panel h2 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #9aa4b2;
  text-transform: uppercase;
}

/* Shared input/field styling */
.rv-field {
  display: flex;
  flex-direction: row;   /* label and input inline */
  align-items: center;
  gap: 8px;
  min-width: 0;          /* allow inputs to shrink in Safari */
}
.rv-field label {
  font-size: 12px;
  color: #a7b0bd;
  white-space: nowrap;   /* keep label on one line */
  min-width: 60px;       /* consistent width for label */
}

.rv-input {
  flex: 1 1 auto;
  height: 36px;
  border: 1px solid #2a3240;
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: 0 12px;
  outline: none;
  min-width: 0;
}
.rv-input:focus {
  border-color: #4460ff;
  box-shadow: 0 0 0 3px rgba(68,96,255,0.25);
}

/* Left column: credentials stacked (each field row has label+input side by side) */
.rv-credentials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.rv-credentials .rv-field { flex: 1 1 auto; }

/* Middle column: buttons stacked */
.rv-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.rv-button {
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #4460ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.rv-button:active { transform: translateY(1px); }
.rv-button-secondary { background: #2a3240; }
.rv-button-secondary:hover { filter: brightness(1.1); }

.rv-hint {
  font-size: 12px;
  color: #808aa1;
  line-height: 1.4;
}

/* Right column: chat */
.rv-chat {
  grid-column: 3 / 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rv-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  border: 1px solid #2a3240;
  border-radius: 10px;
  padding: 8px;
  background: #11141a;
  color: #e6e6e6;
  font: 13px/1.4 system-ui, sans-serif;
  min-height: 120px;
  min-width: 0;
}

.rv-chat-msg { margin: 6px 0; max-width: 100%; word-wrap: break-word; }
.rv-chat-msg.you   { text-align: right; }
.rv-chat-msg.you .bubble   { background: #e6f3ff; }
.rv-chat-msg.remote .bubble{ background: #f2f2f2; }
.rv-chat-msg .meta { font-size: 11px; opacity: .7; }
.rv-chat-msg .bubble { display: inline-block; padding: 6px 10px; border-radius: 6px; }

.rv-chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  min-width: 0;
}
.rv-chat-input {
  width: 100%;
  height: 36px;
  min-width: 0;
}

/* ===== Bottom panel toggle ===== */
.rv-panel-toggle {
  position: fixed;
  right: 12px;
  bottom: calc(var(--BottomBarHeight, 260px) + 12px);
  z-index: 10000;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #2a3240;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.rv-panel-toggle:active { transform: translateY(1px); }

/* When panel is hidden, drop the toggle to the page edge */
.rv-root.rv-panel-hidden .rv-panel-toggle {
  bottom: 12px;
}

/* Collapse the panel cleanly */
.rv-root.rv-panel-hidden .rv-panel {
  height: 0 !important;
  flex-basis: 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
  overflow: hidden !important;
}

/* Optional: if the panel is hidden, let the viewer fully occupy */
.rv-root.rv-panel-hidden .rv-viewer {
  flex: 1 1 auto;
}