/* Layout shell spacing accounting for fixed navbar and footer */
body {
  padding-top: 56px; /* navbar height */
  background: #f8f9fa;
}

.main-shell {
  min-height: calc(100vh - 56px - 44px); /* minus navbar and footer */
}

/* Sidebar */
.sidebar {
  width: 260px;
  transition: width 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.sidebar .nav-link {
  color: #495057;
  border-radius: .5rem;
}

.sidebar .nav-link:hover {
  background-color: #f1f3f5;
}

.navbar #sidebarToggle { z-index: 1040; }


/* Rightbar: thin sticky rail */
.rightbar {
  width: 80px;                 /* slim */
  position: sticky;
  top: 56px;                   /* below navbar */
  height: calc(100vh - 56px - 44px); /* minus navbar + footer */
  overflow-y: auto;
}

.rightbar .rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rightbar .rail .btn-rail {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  border-radius: 0.75rem;
  border: 1px solid #e9ecef;
  background: #fff;
}

.rightbar .label {
  font-size: 10px;
  color: #6c757d;
  text-align: center;
}

/* On small screens, keep it hidden (as before) */
@media (max-width: 991.98px) {
  .rightbar { display: none; }
}


/* Content area fills remaining space */
.content-area {
  min-width: 0; /* prevent overflow on flex layouts */
  background: transparent;
}

/* Collapsed sidebar state — fully hide the sidebar so content expands */
.sidebar-collapsed .sidebar {
  display: none !important;
}

/* On small screens, default collapsed */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 56px;
    bottom: 44px;
    z-index: 1030;
    left: 0;
  }
  .rightbar {
    display: none;
  }
}

/* Footer */
.footer {
  position: sticky;
  bottom: 0;
}

/* Smooth card shadows and rounded look */
.card {
  border: 0;
  box-shadow: 0 2px 14px rgba(33, 37, 41, 0.06);
  border-radius: 1rem;
}

.border-dashed { border-style: dashed !important; }

/* Soft badge variants */
.bg-success-soft { background-color: rgba(25, 135, 84, 0.12) !important; }
.bg-warning-soft { background-color: rgba(255, 193, 7, 0.15) !important; }
.bg-danger-soft  { background-color: rgba(220, 53, 69, 0.12) !important; }
.bg-secondary-soft { background-color: rgba(108, 117, 125, 0.15) !important; }

.badge { border-radius: 999px; padding: 0.5rem 0.65rem; font-weight: 600; letter-spacing: .2px; }


table th:first-child, table td:first-child { width: 64px; }

/* Keep filenames on one line with ellipsis */
.filename-cell {
  max-width: 520px;          /* adjust to taste */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
