/* Custom styles from original template */
/* Global Styles */
:root {
  --primary-color: #2d5016;
  --secondary-color: #4a7c2a;
  --accent-color: #6ba83a;
    --accent-yellow: #ffd700;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-color: #333;
  --light-text: #6c757d;
  --border-color: #dee2e6;
  --light-bg: #f8f9fa;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 70px;
  --header-height: 48px;
  --font-family-sans: "Atlassian Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-family-mono: "Atlassian Mono", monospace;
  --green-primary: #2d5016;
  --green-secondary: #4a7c2a;
  --green-light: #6ba83a;
  --yellow-primary: #ffd700;
  --yellow-secondary: #ffed4e;
  --red-primary: #dc3545;
  --red-secondary: #ff6b6b;
}

body {
  font-family: var(--font-family-sans);
  color: var(--text-color);
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.4;
}

/* Top Navbar */
.top-navbar {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
  box-shadow: 0 2px 4px rgba(45, 80, 22, 0.15);
  height: var(--header-height);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1001;
  transition: all 0.3s;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--yellow-primary);
}

/* Remove navbar brand styles since we're moving it */
.navbar-brand {
  display: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
}

.top-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  margin: 0 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.top-navbar .nav-item.me-3 {
  margin-right: 1rem !important;
}

.top-navbar .nav-link i {
  font-size: 1rem;
  margin-right: 0.5rem;
}

.top-navbar .nav-link.active {
  color: var(--yellow-primary);
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
}

.top-navbar .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.top-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.top-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.top-navbar .dropdown-menu {
  background-color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.15);
  border-radius: 8px;
}

.top-navbar .dropdown-item {
  color: var(--text-color);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.top-navbar .dropdown-item:hover {
  background-color: rgba(107, 168, 58, 0.1);
  color: var(--green-primary);
}

.top-navbar .dropdown-divider {
  border-color: var(--border-color);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
}

.user-profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 0.75rem;
  object-fit: cover;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.user-avatar {
  display: none; /* Hide the initials avatar since we're using image now */
}

/* Notification Icons */
.notification-container {
  position: relative;
  margin: 0 0.5rem;
}

.notification-icon {
  font-size: 1.2rem;
}

.notification-badge {
  position: absolute;
  top: 3px;
  right: -5px;
  background-color: var(--red-primary);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fdf5 100%);
  color: var(--text-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.3s;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(45, 80, 22, 0.1);
  border-right: 1px solid rgba(107, 168, 58, 0.2);
}

.yellow-accent {
    color: var(--accent-yellow);
}

.sidebar-logo {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  margin-top: var(--header-height);
  border-bottom: 2px solid rgba(107, 168, 58, 0.2);
  background: white;
}

.sidebar-logo img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  filter: drop-shadow(0 2px 4px rgba(45, 80, 22, 0.1));
}

.sidebar .nav-item {
  margin: 2px 0;
}

.sidebar .nav-link {
  color: var(--text-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  border-radius: 0;
  margin: 0 0.5rem;
  border-radius: 6px;
}

.sidebar .nav-link i {
  margin-right: 0.75rem;
  width: 18px;
  text-align: center;
  color: var(--green-secondary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
  color: var(--green-primary);
  background: linear-gradient(135deg, rgba(107, 168, 58, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  transform: translateX(2px);
}

.sidebar .nav-link:hover i {
  color: var(--green-primary);
  transform: scale(1.1);
}

.sidebar .nav-link.active {
  color: white;
  background: var(--green-primary);
  border-left: 4px solid var(--green-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(107, 168, 58, 0.2);
}

.sidebar .nav-link.active i {
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-top: var(--header-height);
  margin-left: var(--sidebar-width);
  padding: 1rem;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  background: linear-gradient(135deg, #f5f7fa 0%, #f8fdf5 100%);
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.08);
  margin-bottom: 0.375rem;
  transition: all 0.3s ease;
  background: white;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.12);
  transform: translateY(-1px);
}

.card-header {
  background: linear-gradient(135deg, rgba(107, 168, 58, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
  border-bottom: 1px solid rgba(107, 168, 58, 0.1);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  min-height: 50px;
  border-radius: 8px 8px 0 0;
}

.card-title {
  margin-bottom: 0;
  color: var(--green-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  padding: 1rem;
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
  color: white;
  margin-bottom: 1.5rem;
}

.welcome-card .card-body {
  padding: 1.5rem;
}

.welcome-card .card-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.welcome-card .card-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.welcome-icon {
  font-size: 3rem;
  color: var(--yellow-primary);
  opacity: 0.9;
}

/* Stats Cards */
.stat-card {
  margin-bottom: 1rem;
  border-left: 4px solid var(--yellow-primary);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-left-color: var(--green-light);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.bg-primary-light {
  background: linear-gradient(135deg, rgba(107, 168, 58, 0.1) 0%, rgba(107, 168, 58, 0.05) 100%);
}

.bg-success-light {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.bg-warning-light {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.bg-danger-light {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.text-primary {
  color: var(--green-primary) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

/* Form Sections */
.form-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Form Controls */
.form-control,
.form-select {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  min-height: 38px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(107, 168, 58, 0.1);
}

/* Buttons */
.btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
  border-color: var(--green-primary);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-secondary) 0%, var(--green-light) 100%);
  border-color: var(--green-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 168, 58, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
  border-color: var(--success-color);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #ffed4e 100%);
  border-color: var(--warning-color);
  color: #333;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #ff6b6b 100%);
  border-color: var(--danger-color);
}

/* Tables */
.table {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  background: linear-gradient(135deg, rgba(107, 168, 58, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
  border-bottom: 2px solid rgba(107, 168, 58, 0.1);
  padding: 0.75rem;
  color: var(--green-primary);
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(107, 168, 58, 0.05);
}

.table-hover tbody tr:hover {
  background-color: rgba(107, 168, 58, 0.03);
}

/* Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  font-weight: 500;
}

.bg-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%) !important;
}

.bg-primary {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%) !important;
}

.bg-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #ffed4e 100%) !important;
}

.bg-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #ff6b6b 100%) !important;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: var(--green-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--green-secondary);
  text-decoration: underline;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(107, 168, 58, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
  padding: 1rem 0;
  margin-top: auto;
  border-top: 2px solid rgba(107, 168, 58, 0.1);
}

.footer .container-fluid {
  text-align: center;
  color: var(--light-text);
}

/* Responsive */
@media (max-width: 992px) {
  .top-navbar {
    padding: 0 1rem;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Adjust collapsed sidebar styles */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-logo {
  padding: 0 0.5rem;
}

body.sidebar-collapsed .sidebar-logo img {
  max-height: 30px;
}

body.sidebar-collapsed .sidebar .nav-link span {
  display: none;
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Adjust row spacing */
.row {
  margin-right: -0.25rem;
  margin-left: -0.25rem;
  margin-bottom: 0.375rem;
}

.row:last-child {
  margin-bottom: 0;
}

.row > [class^="col-"] {
  padding-right: 0.25rem;
  padding-left: 0.25rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 0.5rem;
}

/* List Groups */
.list-group-item {
  padding: 0.75rem;
  border: 1px solid rgba(107, 168, 58, 0.1);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: rgba(107, 168, 58, 0.03);
}

/* Tabs and Pills */
.nav-tabs .nav-link,
.nav-pills .nav-link {
  padding: 0.5rem 1rem;
  color: var(--green-primary);
  border-color: rgba(107, 168, 58, 0.2);
}

.nav-tabs .nav-link.active {
  background-color: white;
  border-color: var(--green-light);
  color: var(--green-primary);
}

/* Buttons in Cards */
.card .btn-group {
  margin-bottom: 0.375rem;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.5s ease-out;
}

/* Chart containers */
.chart-container {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.08);
}
