/* ============================================
   Page shell - shared content width (public + authenticated)
   ============================================
   Architecture: One default content shell for normal pages. Explicit exceptions
   (.page-shell-wide, .page-shell-full) for rare wide/full-width pages.
   Not separate public vs secure width systems.
   ============================================ */

.page-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  box-sizing: border-box;
}

.page-shell-wide {
  max-width: 1400px;
}

.page-shell-full {
  max-width: none;
}

/* ============================================
   App shell - premium layout and sidebar
   ============================================ */

:root {
  --app-sidebar-width: 268px;
  --app-sidebar-bg: #f8f9fa;
  --app-sidebar-border: #e8eaed;
  --app-active-bg: rgba(13, 110, 253, 0.12);
  --app-active-border: #0d6efd;
  --app-content-bg: #f0f2f5;
  --app-card-radius: 0.5rem;
  --app-section-gap: 2rem;
  --app-nav-gap: 0.3125rem;
  --app-base-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Layout structure */
.app-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.app-layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  width: var(--app-sidebar-width);
  min-width: var(--app-sidebar-width);
  flex-shrink: 0;
  overflow-y: auto;
  background-color: var(--app-sidebar-bg);
  border-right: 1px solid var(--app-sidebar-border);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.app-sidebar .sidebar-content {
  padding: 1.25rem 0.875rem 1.75rem;
}

.app-sidebar .sidebar-section {
  margin-bottom: 1.5rem;
}

.app-sidebar .sidebar-section:last-child {
  margin-bottom: 0;
}

.app-sidebar .sidebar-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #6c757d;
  padding: 0 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.app-sidebar .nav {
  gap: var(--app-nav-gap);
}

.app-sidebar .nav-link {
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border-left: 3px solid transparent;
  margin-left: 0.25rem;
}

.app-sidebar .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #0d6efd;
}

.app-sidebar .nav-link.active {
  background-color: var(--app-active-bg);
  color: var(--app-active-border);
  font-weight: 600;
  border-left-color: var(--app-active-border);
  border-left-width: 3px;
}

.app-sidebar .nav-link i {
  font-size: 1.125rem;
  opacity: 0.9;
  width: 1.25rem;
  text-align: center;
}

.app-sidebar .nav-link.active i {
  opacity: 1;
  color: inherit;
}

/* Content area - .page-shell in layout handles width; no Bootstrap container */
.app-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--app-content-bg);
}

/* Page headers */
.app-page-header {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1a1d21;
  margin: 0;
  line-height: 1.3;
  font-family: var(--app-base-font);
}

/* Section headers - consistent hierarchy */
.app-section-header {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  font-family: var(--app-base-font);
}

/* Cards - refined spacing */
.app-card {
  border-radius: var(--app-card-radius);
  border: 1px solid #e3e6ea;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background: #fff;
}

.app-card .card-body {
  padding: 1.375rem 1.5rem;
}

.app-card .table {
  margin-bottom: 0;
}

.app-card .table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.app-card .table tbody td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
}

.app-card-sm .card-body {
  padding: 1rem 1.25rem;
}

.app-card .card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.app-card .card-title + * {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1d21;
}

/* Dashboard KPI cards */
.app-kpi-card {
  border-radius: var(--app-card-radius);
  border: 1px solid #e9ecef;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.app-kpi-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.app-kpi-card .card-body {
  padding: 1rem 1.25rem;
}

.app-kpi-card .text-muted {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-kpi-card h4,
.app-kpi-card h5,
.app-kpi-card h6 {
  font-weight: 600;
  margin: 0.25rem 0 0;
}

.app-kpi-card h4 {
  font-size: 1.25rem;
}

.app-kpi-card h5,
.app-kpi-card h6 {
  font-size: 1.0625rem;
}

/* Section spacing */
.app-section {
  margin-bottom: var(--app-section-gap);
}

.app-section:last-child {
  margin-bottom: 0;
}

/* Topbar */
.app-topbar {
  padding: 0.875rem 1.5rem;
  min-height: 60px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  background: #fff !important;
}

.app-topbar .navbar-brand,
.app-topbar a.fw-bold {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-topbar .app-version {
  font-size: 0.7rem;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.app-topbar .dropdown-menu {
  padding: 0.5rem;
  border-radius: 0.5rem;
  min-width: 200px;
}

.app-topbar .dropdown-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border-radius: 0.375rem;
}

.app-topbar .dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Offcanvas mobile sidebar */
.offcanvas.app-sidebar-offcanvas {
  max-width: 280px;
}

.offcanvas.app-sidebar-offcanvas .offcanvas-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--app-sidebar-border);
}

.offcanvas.app-sidebar-offcanvas .offcanvas-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.offcanvas.app-sidebar-offcanvas .offcanvas-body {
  padding: 1.25rem 0.875rem;
  background-color: var(--app-sidebar-bg);
}

/* Reuse sidebar nav styles in offcanvas */
.offcanvas.app-sidebar-offcanvas .nav-link {
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-left: 3px solid transparent;
  margin-left: 0.25rem;
}

.offcanvas.app-sidebar-offcanvas .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #0d6efd;
}

.offcanvas.app-sidebar-offcanvas .nav-link.active {
  background-color: var(--app-active-bg);
  color: var(--app-active-border);
  font-weight: 600;
  border-left-color: var(--app-active-border);
}

/* Mobile */
@media (max-width: 991.98px) {
  .page-shell {
    padding: 1.5rem 1rem 1.75rem;
  }

  .app-page-header {
    margin-bottom: 1.5rem;
  }

  .app-page-header h1 {
    font-size: 1.25rem;
  }

  .app-section {
    margin-bottom: 1.5rem;
  }

  .app-card .table thead th,
  .app-card .table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 575.98px) {
  .page-shell {
    padding: 1.25rem 0.75rem 1.5rem;
  }

  .app-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
/* ============================================
   Public marketing layout - premium feel
   ============================================ */

:root {
  --public-hero-bg: #1a1d21;
  --public-nav-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  --public-card-radius: 0.5rem;
  --public-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --public-base-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Public navbar */
.public-navbar {
  padding: 0.9375rem 0;
  box-shadow: var(--public-nav-shadow);
  font-family: var(--public-base-font);
}

.public-navbar .navbar-brand {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.public-navbar .nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}

.public-navbar .btn-primary {
  font-weight: 600;
  padding: 0.5rem 1.25rem;
}

/* Public hero */
.public-hero {
  padding: 4.5rem 0 5.5rem;
  background: linear-gradient(135deg, var(--public-hero-bg) 0%, #2d3238 100%);
  font-family: var(--public-base-font);
}

.public-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.public-hero .lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 36rem;
}

.public-hero .btn {
  font-weight: 600;
  padding: 0.625rem 1.5rem;
}

/* Public feature cards */
.public-features {
  padding: 4.5rem 0 5.5rem;
}

.public-feature-card {
  border-radius: var(--public-card-radius);
  border: 1px solid #e9ecef;
  background: #fff;
  box-shadow: var(--public-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.public-feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.public-feature-card .card-body {
  padding: 1.75rem 1.5rem;
}

.public-feature-card i.bi {
  font-size: 2.25rem;
  opacity: 0.9;
}

.public-feature-card .card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}

.public-feature-card .card-text {
  font-size: 0.9375rem;
  color: #6c757d;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Public footer */
.public-footer {
  padding: 2.25rem 0;
  margin-top: 3.5rem;
  font-family: var(--public-base-font);
}

.public-footer a {
  font-size: 0.875rem;
}

.public-footer .small {
  font-size: 0.8125rem;
}

/* Public main - breathing room */
.public-main {
  min-height: 50vh;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
