/* =====================================
   CCRVA Root Styles — Clean Apple-like
   ===================================== */

/* === Global Styling (Apple-like clean) === */

/* Header Styling */
.ccrva-header {
  background-color: #27ae60;
  color: white;
  text-align: center;
  padding: 20px 10px;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ccrva-header h1 {
  margin: 0;
  line-height: 1.4;
}

/* === Base === */
body {
  background-color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1d1d1f;
  margin: 0;
}

/* === Navbar === */
.navbar {
  background-color: #ffffff;
  color: #1d1d1f;
  font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1050;
}

.navbar .navbar-brand {
  font-size: 1.1rem;
  white-space: normal;
  line-height: 1.3;
  color: #1d1d1f;
}

/* === Sidebar === */
.sidebar {
  background: #ffffff;
  min-height: 100vh;
  padding-top: 1rem;
  position: sticky;
  top: 56px;
  border-right: 1px solid rgba(0,0,0,0.08);
}

.offcanvas-md {
  background: #ffffff;
}

.sidebar .nav-link {
  color: #1d1d1f;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  padding: 10px 16px;
  transition: all 0.25s ease;
  font-weight: 500;
}

.sidebar .nav-link:hover {
  background-color: rgba(0,0,0,0.05);
  color: #1d1d1f;
  padding-left: 20px;
}

.sidebar .nav-link.active {
  background-color: #e0f5e9;
  font-weight: 600;
  color: #198754 !important;
  border-left: 4px solid #198754;
  padding-left: 18px;
}

/* === Cards === */
.card {
  border-radius: 16px;
  border: none;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.card-title {
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 0.5rem;
}

/* === Buttons === */
.btn-primary {
  border-radius: 12px;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  background-color: #198754;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #157347;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
  border-radius: 12px;
  padding: 0.5rem 1.2rem;
  background-color: #e5e5ea;
  border: none;
  color: #1d1d1f;
}

.btn-secondary:hover {
  background-color: #d1d1d6;
}

/* === Links === */
a {
  color: #198754;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #145c32;
  text-decoration: underline;
}

/* === Dashboard Title === */
.dashboard-title {
  border-left: 4px solid #198754;
  padding-left: 12px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 1rem;
}

/* === Responsive Sidebar === */
@media (max-width: 767.98px) {
  .sidebar {
    position: relative;
    min-height: auto;
  }
}

/* === Navbar Theme Fixes === */
[data-theme="light"] .navbar {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

[data-theme="dark"] .navbar {
  background-color: #1f1f1f !important;
  color: #fff !important;
}

[data-theme="light"] .navbar .navbar-brand,
[data-theme="light"] .navbar .btn,
[data-theme="light"] .navbar span {
  color: #212529 !important;
}

[data-theme="dark"] .navbar .navbar-brand,
[data-theme="dark"] .navbar .btn,
[data-theme="dark"] .navbar span {
  color: #fff !important;
}

/* =========================================
   📸 Uniform, Responsive Photo Grid (FIXED)
   ========================================= */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.photo-thumb {
  width: 200px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* ✅ keeps aspect ratio (no stretching) */
  object-position: center;
  transition: transform 0.25s ease-in-out;
}

.photo-thumb img:hover {
  transform: scale(1.05);
}

@media (max-width: 576px) {
  .photo-thumb {
    width: 140px;
    height: 110px;
  }
}
/* =========================================
   📸 Universal Photo Styles
   ========================================= */

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-start;
}

.photo-thumb {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.2s ease-in-out;
}
.photo-thumb:hover {
  transform: scale(1.02);
}

/* === Default (entry/edit) thumbnails === */
.photo-thumb.sm {
  width: 160px;
  height: 120px;
}
.photo-thumb.sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* === Summary/report full-size === */
.photo-thumb.lg {
  width: auto;
  max-width: 100%;
  max-height: 600px;
  margin: 10px auto;
}
.photo-thumb.lg img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
  .photo-thumb.sm { width: 120px; height: 90px; }
}
