/* Layout Structure */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 60px; /* Height of banner */
}

#banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--panel);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
}

#layout {
  display: flex;
  flex: 1;
  width: 100%;
}

/* Sidebar */
#dx-rail {
  width: 300px;
  min-width: 300px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  position: fixed;
  left: 0;
  top: 60px;
}

/* Main Content */
#main {
  margin-left: 300px;
  flex: 1;
  padding: 2rem;
  max-width: calc(100% - 300px);
  width: 100%;
}

/* Panels and Grids */
.vitals-labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.panel {
  background: var(--panel);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel-h {
  margin-bottom: 1rem;
}

.panel-h h3 {
  color: var(--accent);
  margin: 0;
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: 1rem;
}

.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Forms and Inputs */
label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input:not([type]) {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
  resize: vertical;
}

/* Utility Classes */
.mt-s {
  margin-top: 0.75rem;
}
.mt {
  margin-top: 1.5rem;
}
.mb {
  margin-bottom: 1.5rem;
}

.row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.25rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: white;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: inherit;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Tables */
.mini {
  width: 100%;
  border-collapse: collapse;
}

.mini th,
.mini td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mini th {
  font-weight: 500;
  color: var(--muted);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.crumb:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--border);
}
