/*
 * App-wide styles layered on top of Bootstrap 5.3.
 * Mobile-first: default styles target small screens; use min-width
 * media queries to progressively enhance for tablet/desktop.
 */

:root {
  --app-primary: #0d6efd;
  --app-bottom-nav-height: 60px;
  --app-sidebar-width: 240px;
  --app-navbar-height: 56px;
}

/* Reset */
body {
  padding-bottom: var(--app-bottom-nav-height);
  min-height: 100vh;
  background-color: #f8f9fa;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--app-navbar-height));
}

.app-content {
  flex: 1;
  padding: 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

/* Sidebar: hidden on mobile, visible from md breakpoint up */
.app-sidebar {
  display: none;
  width: var(--app-sidebar-width);
  min-height: calc(100vh - var(--app-navbar-height));
  overflow-y: auto;
  position: sticky;
  top: var(--app-navbar-height);
  height: calc(100vh - var(--app-navbar-height));
}

.app-sidebar .nav-link {
  color: #495057;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

.app-sidebar .nav-link:hover {
  background-color: #e9ecef;
  color: var(--app-primary);
}

.app-sidebar .nav-link.active {
  background-color: #e7f1ff;
  color: var(--app-primary);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  .app-sidebar {
    display: block;
  }
  .app-bottom-nav {
    display: none !important;
  }
}

/* Bottom nav: mobile only */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--app-bottom-nav-height);
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #dee2e6;
  z-index: 1030;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #6c757d;
  font-size: 0.7rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  transition: color 0.15s;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--app-primary);
}

.bottom-nav-item small {
  margin-top: 2px;
}

/* Navbar */
.app-navbar {
  z-index: 1040;
}

/* Messages */
.app-messages {
  margin-bottom: 1rem;
}

.app-messages .alert {
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Cards */
.card {
  border-radius: 0.5rem;
}

/* Tables */
.table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6c757d;
}

.table td {
  font-size: 0.875rem;
  vertical-align: middle;
}

/* Forms */
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Chart containers */
canvas {
  max-height: 300px;
}

/* Badge colors for bank purpose */
.badge {
  font-weight: 500;
  font-size: 0.7rem;
}

/* Empty state */
.text-center svg.text-muted {
  opacity: 0.4;
}

/* Offcanvas (mobile menu) */
.offcanvas-body .nav-link {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}
