/* =========================
   Shell
   ========================= */

.fsapp-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f5f5;
  color: #111;
}

.fsapp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  border-top: 1px solid #e5e5e5;
}

.fsapp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 var(--padding-l);
}

.fsapp-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fsapp-header-actions {
  font-size: 0.95rem;
  color: #666;
}

.fsapp-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.fsapp-sidebar {
  padding: 1rem;
  background: #fcfcfc;
  border-right: 1px solid #e5e5e5;
}

.fsapp-main {
  min-width: 0;
  padding: 1rem;
}

.fsapp-viewport {
  min-width: 0;
}

/* =========================
   Nav
   ========================= */

.fsapp-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fsapp-nav-link {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fsapp-nav-link:hover {
  background: #f1f1f1;
  border-color: #d6d6d6;
  transform: translateY(-1px);
}

/* =========================
   Flash messages
   ========================= */

.fsapp-messages {
  border: 1px solid #ddd;
  min-height: 3em;
  border-radius: var(--br-l);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background-color: white;
}

.fsapp-message {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  font-size: 0.95rem;
}

.fsapp-message-info {
  border-color: #d9d9d9;
  background: #fff;
}

.fsapp-message-success {
  border-color: #b9e4c9;
  background: #eefaf2;
}

.fsapp-message-error {
  border-color: #f0b8b8;
  background: #fff1f1;
}

/* =========================
   Generic view + panel
   ========================= */

.fsapp-view {
  width: 100%;
}

.panel {
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #ececec;
  background: #fcfcfc;
}

.panel-header-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
}

.panel-body {
  padding: 1.25rem;
}

.card {
  padding: 1rem;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
}

.card + .card {
  margin-top: 1rem;
}

.card.soft {
  background: #fafafa;
}

.card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}