/**
 * MonsterAgro Main Stylesheet
 * 
 * This file contains all global styles for the MonsterAgro application.
 * Color scheme: Green (#28a745) for primary actions, Purple (#667eea) for secondary
 * Background: Wheat color (#F5DEB3) for consistent page appearance
 * 
 * Sections:
 * - Global body styles
 * - Button styles (custom, delete)
 * - Table styles (containers, headers, rows)
 * - Form styles (containers, labels, controls)
 * - Card styles (custom cards with hover effects)
 * - Navigation styles (navbar, branding)
 * - Login page styles
 * - Statistics display styles
 * - Edit farm form styles
 * - Alert/notification styles
 * - Responsive design rules
 */

/* ============================================
   GLOBAL BODY STYLES
   ============================================ */

body {
  font-family: Arial, sans-serif;
  /* Wheat background color applied to all pages for consistency */
  background-color: #F5DEB3;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

/* Primary custom button - used for add/save actions */
.btn-custom {
  background-color: #28a745; /* Green */
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* Hover state for primary button - darker green */
.btn-custom:hover {
  background-color: #218838;
  color: white;
}

/* Delete button - red for destructive actions */
.btn-delete {
  background-color: #dc3545; /* Red */
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* Hover state for delete button - darker red */
.btn-delete:hover {
  background-color: #c82333;
}

/* ============================================
   TABLE STYLES
   ============================================ */

/* Container for tables - white background with shadow for depth */
.table-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Main table element - full width */
.degv_tabula {
  width: 100%;
}

/* Table header row - green background with white text */
.tabulas_galva {
  background-color: #28a745;
  color: white;
  padding: 12px;
  text-align: left;
}

/* Table data rows - light borders for separation */
.tabulas_ieraksts {
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
}

/* ============================================
   FORM STYLES
   ============================================ */

/* Form container - white box with shadow */
.form-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ============================================
   CARD STYLES
   ============================================ */

/* Custom card component - used for content blocks */
.card-custom {
  border: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: transform 0.2s; /* Smooth animation on hover */
}

/* Card hover effect - lifts card up slightly */
.card-custom:hover {
  transform: translateY(-5px);
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

/* Navigation bar - subtle shadow for separation */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Logo image in navbar - fixed height */
.navbar-brand img {
  height: 50px;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

/* Login form container - centered on page */
.login-container {
  max-width: 400px;
  margin: 100px auto; /* Center vertically and horizontally */
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Login header section */
.login-header {
  text-align: center;
  margin-bottom: 30px;
}

/* Login title - green color matching brand */
.login-header h2 {
  color: #28a745;
}

/* ============================================
   STATISTICS DISPLAY STYLES
   ============================================ */

/* Stat box - used for displaying key metrics */
.stat-box {
  /* Purple gradient background for visual appeal */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Stat box label - smaller text above the number */
.stat-box h6 {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

/* Stat box value - large prominent number */
.stat-box h3 {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

/* ============================================
   EDIT FARM FORM STYLES
   ============================================ */

/* Edit farm form container */
.edit-farm-form {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Form label styling */
.form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

/* Form input focus state - purple border and shadow */
.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Primary button - purple for secondary actions */
.btn-primary {
  background-color: #667eea;
  border-color: #667eea;
}

/* Primary button hover - darker purple */
.btn-primary:hover {
  background-color: #5568d3;
  border-color: #5568d3;
}

/* Secondary button - gray for less important actions */
.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Secondary button hover - darker gray */
.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

/* ============================================
   ALERT/NOTIFICATION STYLES
   ============================================ */

/* Info alert - light blue background */
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Danger alert - light red background for errors */
.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile devices - tables become scrollable */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
  }
}
