/* ===== FONT IMPORTS ===== */
/* Noto Sans Tamil - Industrial Tamil Font */
@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../../fonts/Noto_Sans_Tamil/static/NotoSansTamil-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../../fonts/Noto_Sans_Tamil/static/NotoSansTamil-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../../fonts/Noto_Sans_Tamil/static/NotoSansTamil-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../../fonts/Noto_Sans_Tamil/static/NotoSansTamil-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Roboto - Industrial English Font */
@font-face {
  font-family: 'Roboto';
  src: url('../../fonts/Roboto/static/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../../fonts/Roboto/static/Roboto-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../../fonts/Roboto/static/Roboto-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../../fonts/Roboto/static/Roboto-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== FONT VARIABLES ===== */
:root {
  --font-tamil-primary: "Noto Sans Tamil", "Latha", "Tamil Sangam MN", sans-serif;
  --font-english-primary: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mixed: "Noto Sans Tamil", "Roboto", system-ui, sans-serif;
  
  /* Font weights for industrial use */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Base font size for industrial readability */
  --font-size-base: 16px;
  --line-height-base: 1.6;
}

/* ===== BASE STYLES ===== */
body,
html {
  height: 100%;
  margin: 0;
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

/* Navbar styling for accessibility - focus on color changes */
.navbar-left {
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #2c3e50;
  /* Dark blue background for high contrast */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #dee2e6;
  transition: transform 0.3s ease-in-out;
}

.navbar-left.collapsed {
  transform: translateX(-250px);
}

.navbar-brand {
  color: #ecf0f1;
  /* Light text for high contrast */
  padding-left: 20px;
}

/* Navbar items */
.navbar-nav {
  flex-grow: 1;
  justify-content: center;
  text-align: center;
}

.navbar-nav .nav-link {
  color: #ecf0f1;
  /* Light text for contrast */
  padding: 10px;

  background-color: transparent;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background-color: #34495e;
  /* Slightly lighter background for hover */
  color: #ffffff;
}

/* Bottom logo */
.navbar-logo {
  width: 50px;
  height: 50px;
}

@media (max-width: 994px) {
  .navbar-logo {
    width: 30px;
    height: 30px;
  }
}


/* Main content area */
.content {
  margin-left: 250px;
  padding: 20px;
  background-color: #f4f6f7;
  /* Light background for content */
  color: #2c3e50;
  /* Dark text for readability */
  height: 100vh;
  overflow-y: auto;
  transition: margin-left 0.3s ease-in-out;
}

.content.expanded {
  margin-left: 0;
}

/* Login form styling */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background-color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.login-container h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #2c3e50;
}

/* Toggle button styling */
.navbar-toggle {
  position: fixed;
  left: 180px;
  top: 10px;
  z-index: 1000;
  background-color: #2c3e50;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: left 0.3s ease-in-out;
}

.navbar-toggle:hover {
  background-color: #34495e;
}

.navbar-toggle .bi {
  font-size: 1.2rem;
}

.navbar-toggle.collapsed {
  left: 30px;
}

/* Mobile responsive adjustments */
@media (max-width: 994px) {
  .navbar-left {
    width: 100%;
    position: relative;
    height: auto;
    flex-direction: row;
    padding-right: 10px;
  }

  .content {
    margin-left: 0;
  }

  .login-container {
    margin-top: 20px;
  }
}

/* Ensure sufficient line spacing and larger font sizes for legibility */
.formsel {
  border-radius: 0 !important;
  border: 0 !important;
}

.formsel:disabled {
  background-color: white !important;
}

.invalid-cell {
  background-color: #f8d7da !important;
  /* Light red/pinkish background */
  border: 1px solid #f5c6cb !important;
  /* Light red border */
  color: #721c24 !important;
  /* Red text color */
}

/* === Dashboard Modern Style Improvements === */
.dashboard-card.card {
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10), 0 1.5px 4px rgba(44, 62, 80, 0.08);
  border: none;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}

.dashboard-card.card:hover {
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.16), 0 3px 8px rgba(44, 62, 80, 0.10);
  transform: translateY(-2px) scale(1.01);
}

.dashboard-card .card-title {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1a2942;
  margin-bottom: 1.25rem;
}

.dashboard-card .card-body {
  padding: 2rem 1.5rem 1.5rem 1.5rem;
}

.dashboard-summary-label {
  color: #6c757d;
  font-size: 1.05rem;
}

.dashboard-summary-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0d6efd;
}

#prod-status-chart {
  margin-top: 1.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.5rem;
}

/* Recent Activity Lists */
#recent-productions,
#recent-pos,
#recent-purchases {
  border-radius: 0.75rem;
  background: #f8fafc;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.04);
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

#recent-productions .list-group-item,
#recent-pos .list-group-item,
#recent-purchases .list-group-item {
  border: none;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  background: #fff;
  transition: background 0.15s;
}

#recent-productions .list-group-item:hover,
#recent-pos .list-group-item:hover,
#recent-purchases .list-group-item:hover {
  background: #e9f2ff;
}

/* Dashboard header improvements */
.dashboard-header {
  background: linear-gradient(90deg, #0d6efd 0%, #20c997 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(44, 62, 80, 0.10);
}

.dashboard-header h2 {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Responsive tweaks */
@media (max-width: 767px) {
  .dashboard-card .card-body {
    padding: 1.25rem 0.75rem 1rem 0.75rem;
  }

  .dashboard-header {
    padding: 1rem 1rem;
  }
}

/* Dashboard date picker style */
#dashboard-date-picker {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #1a2942;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#dashboard-date-picker:focus {
  border-color: #0d6efd;
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

/* Dashboard summary value highlight */
.dashboard-summary-value,
#prod-total-tons.fw-bold,
#po-total-orders.fw-bold,
#purchase-total-count.fw-bold {
  color: #0d6efd;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #e3f0ff 0%, #f8fafc 100%);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  margin-left: 0.25rem;
}




/* Responsive: make date picker full width on mobile */
@media (max-width: 767px) {
  #dashboard-date-picker {
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
  }
}

/* ===== TAMIL & BILINGUAL FONT STYLES ===== */

/* Tamil-specific content */
.tamil-text, 
[lang="ta"],
.ta {
  font-family: var(--font-tamil-primary);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.25px;
}

/* English-specific content */
.english-text, 
[lang="en"],
.en {
  font-family: var(--font-english-primary);
  font-weight: var(--font-weight-normal);
}

/* Headers with mixed content */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
}

/* Form elements */
.form-label {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0.375rem;
}

.form-control, .form-select {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-base);
}

/* Table styles */
.table th {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
  font-size: 0.95rem;
}

.table td {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-normal);
}

/* Button styles */
.btn {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-medium);
}

/* Modal styles */
.modal-title {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
}

/* Alert styles */
.alert {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-medium);
}

.alert[lang="ta"] {
  font-family: var(--font-tamil-primary);
  font-weight: var(--font-weight-semibold);
  font-size: 1.05rem;
}

/* Navigation styles */
.navbar-nav .nav-link {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-medium);
}

.navbar-brand {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
}

/* Dashboard specific styles */
.dashboard-card .card-title {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-bold);
}

.dashboard-summary-label {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-medium);
}

.dashboard-summary-value {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
}

/* Data display (numbers, measurements) */
.data-display, 
.measurement-text,
.number-display {
  font-family: var(--font-english-primary);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
}

/* Critical text that needs high visibility */
.critical-text,
.warning-text,
.error-text {
  font-family: var(--font-mixed);
  font-weight: var(--font-weight-semibold);
  font-size: 1.1rem;
}

/* Responsive font adjustments */
@media (max-width: 767px) {
  :root {
    --font-size-base: 15px;
    --line-height-base: 1.5;
  }
  
  .tamil-text, [lang="ta"], .ta {
    font-size: 0.95rem;
  }
  
  h1, h2, h3, h4 {
    font-size: 1.25rem;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
}