/* General */
body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Login page */
.login-page {
  background-color: #e9ecef;
}

.login-page .card {
  border: none;
  border-radius: 12px;
}

/* Navbar */
.navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Sidebar */
.sidebar {
  min-height: calc(100vh - 56px);
  background-color: #212529;
  padding-top: 1rem;
}

.sidebar .nav-link {
  color: #adb5bd;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 2px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background-color: #0d6efd;
}

.sidebar .nav-link i {
  margin-right: 8px;
}

/* Main content */
.main-content {
  padding: 1.5rem;
}

/* Receipt table */
.table th {
  background-color: #f1f3f5;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

/* Yellow highlight for unreviewed categories and missing values */
.category-unreviewed,
td.value-missing {
  background-color: #fff3cd !important;
  font-weight: 600;
}

/* Amber highlight for needs review rows */
.row-needs-review {
  background-color: #fff8e1 !important;
}

/* Status badges */
.badge-needs-review {
  background-color: #fd7e14;
  color: white;
}

.badge-credit {
  background-color: #198754;
  color: white;
}

/* Upload button */
.btn-upload {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
}

/* Upload modal preview */
#imagePreview {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

/* Image lightbox modal */
#imageModal {
  z-index: 9999 !important;
}

/* Edit modal expanded image */
#editImageExpanded {
  border-radius: 0;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
  position: relative;
}

/* Back to Form button - clearly visible on dark background */
#editImageExpanded .btn-back-to-form {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background-color: #0d6efd;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
}

#editImageExpanded .btn-back-to-form:hover {
  background-color: #0b5ed7;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 80vh;
    opacity: 1;
  }
}

/* Responsive table on mobile */
@media (max-width: 768px) {
  .main-content {
    padding: 0.75rem;
  }

  .sidebar {
    min-height: auto;
  }

  .table-responsive {
    font-size: 0.8rem;
  }

  .btn-upload {
    bottom: 1rem;
    right: 1rem;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
}