/* CSS Styles for OLED Production App */
:root {
  --bg-color: #0f172a;
  --panel-bg: #1e293b;
  --panel-bg-rgb: 30, 41, 59;
  --panel-border: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --primary-color: #6366f1;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --error-color: #ef4444;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 40px;
}

/* Header */
header {
  background: rgba(var(--panel-bg-rgb), 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease-in-out !important;
}

header.header-hidden {
  transform: translateY(-100%) !important;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.app-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  background: var(--primary-gradient);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

header h1 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

header .subtitle {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.btn-install {
  background: var(--primary-gradient);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
  transition: var(--transition-smooth);
}

.btn-install:active {
  transform: scale(0.95);
}

/* Layout Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section {
  background-color: rgba(var(--panel-bg-rgb), 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  padding: 12px 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
}

.section-header h2 {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Badges */
.badge {
  background-color: #334155;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

button.badge {
  transition: all 0.2s ease;
}

button.badge:hover {
  background-color: #475569;
  color: var(--text-primary);
}

button.badge:active {
  transform: scale(0.95);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.required-label::after {
  content: " *";
  color: var(--error-color);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-control {
  background-color: var(--bg-color);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Ẩn các nút tăng/giảm mặc định của trình duyệt */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
.form-control::-webkit-outer-spin-button,
.form-control::-webkit-inner-spin-button,
.defect-input::-webkit-outer-spin-button,
.defect-input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}
input[type=number] {
  -moz-appearance: textfield !important;
  appearance: none !important;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

/* Date Pickers specific styling */
input[type="date"].form-control {
  padding: 10px 12px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1);
}

/* Downtime Legend Grid Layout (1 row has 2 items, aligned in columns) */
#chartDowntime .apexcharts-legend {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px 16px !important;
  padding: 0 16px !important;
  justify-items: start !important;
}

#chartDowntime .apexcharts-legend-series {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}

/* Order Grid / Cards */
.order-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  background-color: var(--bg-color);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.order-card:active {
  transform: scale(0.98);
}

.order-card.selected {
  border-color: var(--primary-color);
  background-color: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-line {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-color);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.order-shift {
  font-size: 11px;
  color: var(--text-secondary);
}

.order-model {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px dashed var(--panel-border);
  padding-top: 8px;
}

.order-po {
  font-family: monospace;
}

.order-plan span {
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-primary);
}

/* Selected Order Detail Panel */
.selected-order-summary {
  background-color: var(--bg-color);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 14px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-row span {
  font-size: 11px;
  color: var(--text-secondary);
}

.summary-row strong {
  font-size: 13px;
  color: var(--text-primary);
}

/* Loader Spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px stroke var(--panel-border);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-size: 13px;
  color: var(--text-secondary);
}

.no-data {
  text-align: center;
  padding: 40px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--panel-bg);
  border: 1.5px solid var(--panel-border);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  z-index: 1000;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--success-color);
  background-color: rgba(16, 185, 129, 0.1);
}

.toast.error {
  border-color: var(--error-color);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Defects Grid Custom Styles */
.defects-section {
  margin-top: 10px;
  margin-bottom: 20px;
  background-color: rgba(15, 23, 42, 0.4);
  padding: 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--panel-border);
}

.defects-section .section-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.defects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.defect-item {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-shadow: var(--shadow-md);
}

.defect-item label {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.2;
}

.defect-item input.defect-input {
  width: 100%;
  text-align: center;
  padding: 4px 6px;
  height: 24px;
  font-size: 11px;
  background-color: var(--bg-color);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-primary);
}

.defect-item input.defect-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
}

/* Tablet screen adjustment */
@media (min-width: 480px) {
  .defects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Recent Dates Buttons styling */
.date-buttons-container {
  display: flex;
  gap: 6px;
  margin-top: 0;
}

.date-btn {
  flex: 1;
  background-color: var(--bg-color);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-secondary);
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.date-btn:active {
  transform: scale(0.95);
}

.date-btn.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.date-btn .date-day {
  font-size: 11px;
  font-weight: 700;
}

.date-btn .date-label {
  font-size: 8px;
  opacity: 0.7;
  font-weight: 500;
}

/* Tab Buttons */
.tab-container {
  position: relative; /* Offset parent for tab-indicator */
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 4px 0;
  background: rgba(var(--panel-bg-rgb), 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-indicator {
  position: absolute;
  background: var(--primary-gradient);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transition: all 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
  pointer-events: none;
}

.tab-btn {
  position: relative;
  z-index: 2;
  flex: 0 0 calc(25% - 4px);
  box-sizing: border-box;
  padding: 6px 2px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 10px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
}

.tab-btn i, .tab-btn svg, .lucide {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  transform: translateY(-0.5px);
}

.tab-btn:active {
  transform: scale(0.96);
}

.tab-btn.active {
  background: transparent !important;
  color: white !important;
  box-shadow: none !important;
  transform: translateY(-0.5px);
}

.tab-btn.active i, .tab-btn.active svg {
  transform: scale(1.08);
}

/* Horizontal Bar Chart Styles */
.chart-line-row {
  margin-bottom: 20px;
}

.chart-line-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.chart-bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(var(--panel-bg-rgb), 0.5);
  padding: 8px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(51, 65, 85, 0.2);
}

.chart-bar-container {
  display: flex;
  align-items: center;
  width: 100%;
}

.chart-bar {
  height: 18px;
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chart-bar.plan {
  background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.chart-bar.actual {
  background: linear-gradient(90deg, #ec4899, #be123c);
}

.chart-bar-value {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

/* Dark theme for Shift Report Sheet matching the app interface */
.report-sheet-wrapper {
  background: rgba(var(--panel-bg-rgb), 0.4) !important;
  color: var(--text-primary) !important;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.15) !important;
  box-shadow: var(--shadow-lg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin-top: 10px;
}

/* Banner header */
.report-sheet-wrapper .title-banner {
  background: rgba(var(--panel-bg-rgb), 0.7) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
}
.report-sheet-wrapper .title-banner strong,
.report-sheet-wrapper .title-banner span {
  color: white !important;
}
.report-sheet-wrapper .title-banner label {
  color: #38bdf8 !important;
}

/* Group sections header */
.report-sheet-wrapper span[style*="text-transform: uppercase"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

/* Tables styling override */
.report-sheet-wrapper table {
  background: rgba(15, 23, 42, 0.5) !important;
  border: none !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}
.report-sheet-wrapper thead tr {
  background: rgba(var(--panel-bg-rgb), 0.9) !important;
  color: #38bdf8 !important;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2) !important;
}
.report-sheet-wrapper th {
  color: #38bdf8 !important;
  border: none !important;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.15) !important;
  font-weight: 700 !important;
}
.report-sheet-wrapper tbody tr {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  transition: background 0.15s ease;
}
.report-sheet-wrapper tbody tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}
.report-sheet-wrapper td {
  color: #cbd5e1 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  font-weight: 500 !important;
}
.report-sheet-wrapper td[style*="color: white"],
.report-sheet-wrapper td[style*="color:white"] {
  color: white !important;
  font-weight: 700 !important;
}
.report-sheet-wrapper td[style*="color: var(--text-primary)"],
.report-sheet-wrapper td[style*="color:var(--text-primary)"] {
  color: white !important;
}
.report-sheet-wrapper td[style*="color: var(--text-secondary)"],
.report-sheet-wrapper td[style*="color:var(--text-secondary)"] {
  color: #94a3b8 !important;
}
.report-sheet-wrapper tr[style*="color: white"],
.report-sheet-wrapper tr[style*="color:white"] {
  background: rgba(var(--panel-bg-rgb), 0.6) !important;
  color: white !important;
  border-top: 2px solid rgba(56, 189, 248, 0.2) !important;
}
.report-sheet-wrapper tr[style*="color: white"] td,
.report-sheet-wrapper tr[style*="color:white"] td {
  color: white !important;
  font-weight: 700 !important;
}

/* Bottom summary text card */
.report-sheet-wrapper .summary-card {
  background: rgba(var(--panel-bg-rgb), 0.5) !important;
  border: 1px solid rgba(56, 189, 248, 0.15) !important;
  color: #cbd5e1 !important;
}
.report-sheet-wrapper .summary-card span,
.report-sheet-wrapper .summary-card div,
.report-sheet-wrapper .summary-card strong {
  color: #cbd5e1 !important;
}
.report-sheet-wrapper .summary-card div[style*="color: white"],
.report-sheet-wrapper .summary-card div[style*="color:white"] {
  color: white !important;
  font-weight: 700 !important;
}
.report-sheet-wrapper .summary-card div[style*="color: var(--text-secondary)"],
.report-sheet-wrapper .summary-card div[style*="color:var(--text-secondary)"] {
  color: #94a3b8 !important;
}

/* Compact Manpower Form Textbox Spacing */
#manpowerForm .form-group {
  margin-bottom: 2px;
  gap: 3px;
}
#manpowerForm .form-row {
  gap: 8px;
}
#manpowerForm .form-control {
  padding: 8px 12px;
  font-size: 13px;
}
#manpowerForm label {
  font-size: 11.5px;
  margin-bottom: 1px;
}

/* Line Layout Tab styles */
.line-layout-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(var(--panel-bg-rgb), 0.4);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.line-layout-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
}
.line-layout-stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}
.line-layout-stat-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 800;
  margin-top: 2px;
}
.line-layout-stat-value.total {
  color: #06b6d4;
}

.line-card-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.line-card {
  background: rgba(var(--panel-bg-rgb), 0.3);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.line-card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  border-left: 3px solid var(--primary-color);
  padding-left: 6px;
  margin-bottom: 0;
}
.line-machines-wrapper {
  overflow-x: auto;
  padding-bottom: 6px;
}
.line-machines-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 100%;
  padding: 4px 0;
}
.machine-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  position: relative;
}
.machine-img-box {
  width: 70px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(51, 65, 85, 0.5);
  margin: 6px 0;
  padding: 2px;
}
.machine-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.machine-name-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
}
.operator-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operator-tag.day {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.operator-tag.night {
  background-color: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}
.operator-tag.empty {
  background-color: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: rgba(148, 163, 184, 0.4);
}

/* Drag and Drop Diagram styling */
.draggable-active {
  cursor: move;
  outline: 1.5px dashed var(--accent-color) !important;
  background-color: rgba(6, 182, 212, 0.1) !important;
  z-index: 10;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.line-machines-canvas {
  position: relative;
  height: 145px;
  min-width: 100%;
  background: rgba(15, 23, 42, 0.3);
  border-radius: var(--border-radius-md);
  border: 1px dashed rgba(51, 65, 85, 0.4);
  margin-top: 2px;
  overflow: hidden;
}
.machine-column {
  position: absolute; /* absolutely positioned */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95px;
  user-select: none;
  touch-action: auto;
}
.operator-tag-absolute {
  position: absolute;
  user-select: none;
  touch-action: auto;
  z-index: 5;
}
.line-machines-canvas.editing .machine-column,
.line-machines-canvas.editing .operator-tag-absolute {
  touch-action: none;
}

/* --- CUSTOM GLOBAL SCROLLBARS --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 3px;
  transition: var(--transition-smooth);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* --- SKELETON SHIMMER LOADING EFFECT --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-loader {
  background: linear-gradient(90deg, rgba(var(--panel-bg-rgb), 0.6) 25%, rgba(51, 65, 85, 0.8) 50%, rgba(var(--panel-bg-rgb), 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
  height: 12px;
  width: 100%;
  display: inline-block;
}

/* --- RESPONSIVE MOBILE ACTION SHEET --- */
@keyframes actionSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (max-width: 500px) {
  #rowActionsModal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #rowActionsModal > div {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
    animation: actionSheetUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 24px 24px 32px 24px !important;
  }
  #reportFilterContainer {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* --- MODERN COMPACT DASHBOARD TABLE --- */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  text-align: center;
}
.dashboard-table th {
  padding: 5px 3px;
  font-weight: 700;
  white-space: nowrap;
  color: #38bdf8;
  background: rgba(var(--panel-bg-rgb), 0.8);
  border-bottom: 2px solid rgba(56, 189, 248, 0.25);
  border-top: none;
  border-left: none;
  border-right: none;
}
.dashboard-table td {
  padding: 5px 3px;
  white-space: nowrap;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dashboard-table tbody tr {
  transition: background 0.15s ease;
  cursor: pointer;
}
.dashboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* --- CHART INTERACTIVITY ON HOVER --- */
#downtimeBarChart > div {
  transition: transform 0.2s ease, filter 0.2s ease;
}
#downtimeBarChart > div:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.15);
}

/* --- LIVE PULSE INDICATOR --- */
.live-pulse {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
.live-pulse.offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-offline 1.8s infinite;
}
@keyframes pulse-offline {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* --- PORTAL BADGE --- */
.portal-badge {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* --- PROFILE DROPDOWN MENU --- */
.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.profile-trigger:active {
  transform: scale(0.97);
}
.profile-dropdown-menu {
  display: none;
  animation: dropdownSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-dropdown-menu.show {
  display: flex !important;
}
@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-smooth);
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.dropdown-item i, .dropdown-item svg {
  stroke-width: 2px;
}

/* --- SETTINGS MODAL INTERNAL TABS --- */
.settings-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.settings-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}
.settings-tab-btn.active {
  background: var(--panel-bg);
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* --- DEVICE MONITORING ITEMS --- */
.device-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.device-item-card {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}
.device-item-card:hover {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}
.device-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.device-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.device-icon-wrapper.online {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}
.device-text-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.device-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.device-name-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed transparent;
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 0;
  margin: 0;
  outline: none;
  width: 100px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.device-name-input:focus {
  border-color: var(--accent-color);
  background: rgba(var(--panel-bg-rgb), 0.6);
  padding: 1px 4px;
  border-radius: 4px;
}
.device-status-badge {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 8px;
  width: fit-content;
  display: inline-block;
  line-height: 1.2;
}
.device-status-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.device-status-badge.offline {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}
.device-status-badge.blocked {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}
.btn-device-action {
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.btn-device-action.block {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}
.btn-device-action.block:hover {
  background: #f43f5e;
  color: white;
}
.btn-device-action.allow {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.btn-device-action.allow:hover {
  background: #10b981;
  color: white;
}

/* --- LIGHT THEME STYLE OVERRIDES --- */
body.light-theme {
  --panel-bg-rgb: 255, 255, 255;
  --btn-bg: #e2e8f0;
  --glass-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.12);
}

/* Light Theme Tab Overrides */
body.light-theme .tab-container {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.04) !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

body.light-theme .parent-tab-btn {
  color: #64748b !important;
}

body.light-theme .parent-tab-btn.active {
  color: #0d9488 !important;
}

body.light-theme .parent-tab-btn.active::after {
  background-color: #0d9488 !important;
  box-shadow: 0 0 6px #0d9488 !important;
}

body.light-theme .tab-icon-svg {
  stroke: currentColor !important;
}

body.light-theme .parent-tab-btn.active .tab-icon-svg {
  stroke: #0d9488 !important;
}

body.light-theme .tab-label-kr {
  color: #64748b !important;
}

body.light-theme .parent-tab-btn.active .tab-label-kr {
  color: #0d9488 !important;
  opacity: 0.95 !important;
}

body.light-theme .tab-label-vi {
  color: #64748b !important;
}

body.light-theme .parent-tab-btn.active .tab-label-vi {
  color: #0d9488 !important;
}

body.light-theme input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
body.light-theme select,
body.light-theme textarea,
body.light-theme .form-control,
body.light-theme .defect-input,
body.light-theme .custom-date-btn {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
  color: #94a3b8 !important;
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus,
body.light-theme .form-control:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15) !important;
  outline: none !important;
}

body.light-theme .form-control[readonly] {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
}
body.light-theme select.form-control option {
  background-color: white;
  color: #0f172a;
}
body.light-theme .quantity-input-wrapper button {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #475569 !important;
}
body.light-theme .quantity-input-wrapper button:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}
body.light-theme .dashboard-table th {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  border-bottom: 1.5px solid rgba(15, 23, 42, 0.1);
}
body.light-theme .dashboard-table td {
  color: #334155;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
body.light-theme .dashboard-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.02) !important;
}
body.light-theme .card, body.light-theme .section, body.light-theme header {
  background: rgba(var(--panel-bg-rgb), 0.85);
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .modal-content {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
}
body.light-theme .modal-content h3 {
  color: var(--primary-color) !important;
}
body.light-theme .modal-content label {
  color: #475569 !important;
}
body.light-theme #setupPermissionsContainer {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
body.light-theme #setupPermissionsContainer label {
  color: #0f172a !important;
}
body.light-theme .device-item-card {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .device-name-input {
  color: #0f172a;
}
body.light-theme .device-name-input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-color);
}
body.light-theme .profile-dropdown-menu {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
}
body.light-theme .dropdown-item {
  color: #334155 !important;
}
body.light-theme .dropdown-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}
body.light-theme .settings-tabs {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .settings-tab-btn.active {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}
body.light-theme .lbl-active-user {
  color: #334155 !important;
}
body.light-theme .profile-trigger {
  background: rgba(15, 23, 42, 0.03) !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}
body.light-theme .profile-trigger:hover {
  background: rgba(15, 23, 42, 0.06) !important;
}
body.light-theme #deviceLogsWrapper {
  background: rgba(15, 23, 42, 0.03) !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
}

/* --- QUANTITY BUTTON STYLE --- */
/* --- PREMIUM PILL QUANTITY SELECTOR --- */
.quantity-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1.5px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
  padding: 1px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.quantity-input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.btn-qty-adjust {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  width: 0 !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, width 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s, background-color 0.2s, color 0.2s, transform 0.2s !important;
}
.btn-qty-adjust:hover {
  background: rgba(255,255,255,0.06) !important;
  color: white !important;
}
.btn-qty-adjust:active {
  background: rgba(255,255,255,0.12) !important;
  transform: scale(0.92);
}

.quantity-input-wrapper:focus-within .btn-qty-adjust,
.quantity-input-wrapper.active-focus .btn-qty-adjust {
  opacity: 1;
  visibility: visible;
  width: 22px !important;
  pointer-events: auto;
}

.quantity-input-wrapper input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 22px !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 11px !important;
  color: var(--text-primary) !important;
  width: 100% !important;
  outline: none !important;
  flex: 1 !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Sizing modifier for normal large textboxes (downtime code 1-5, actual quantities) */
.quantity-input-wrapper.large-pill {
  height: 38px;
  border-radius: 8px;
  padding: 3px;
}
.quantity-input-wrapper.large-pill .btn-qty-adjust {
  width: 0 !important;
  height: 32px !important;
  font-size: 16px !important;
  border-radius: 6px;
}
.quantity-input-wrapper.large-pill:focus-within .btn-qty-adjust,
.quantity-input-wrapper.large-pill.active-focus .btn-qty-adjust {
  opacity: 1;
  visibility: visible;
  width: 32px !important;
  pointer-events: auto;
}
.quantity-input-wrapper.large-pill input {
  height: 32px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Light Theme overrides for pill selector */
body.light-theme .quantity-input-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.15);
}
body.light-theme .btn-qty-adjust:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
body.light-theme .quantity-input-wrapper input {
  color: #0f172a !important;
}

/* --- ORANGE OFFLINE PULSE --- */
@keyframes pulse-orange {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Transition mượt mà khi đổi giao diện sáng/tối */
body, .card, .section, header, .form-control, .defect-input, .settings-tab-btn, .device-item-card, .profile-dropdown-menu, .modal-content, .btn-install, .quantity-input-wrapper button {
  transition: background 0.3s ease, background-color 0.3s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease !important;
}

#themeToggleBtn {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease !important;
}
#themeToggleBtn:hover {
  transform: rotate(45deg) scale(1.15);
  color: var(--accent-color) !important;
}

/* --- DASHBOARD STYLES --- */
.container.dashboard-active {
  max-width: 1200px !important;
  width: 95% !important;
}

.dashboard-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.kpi-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

.kpi-sub.green {
  color: #34d399;
}

.kpi-sub-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: visible;
  margin-top: 6px;
}

.kpi-sub-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 2px rgba(2, 132, 199, 0.6));
}

.kpi-sub-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: scanning 2s infinite linear;
}

@keyframes scanning {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
}

.dashboard-panel {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.panel-header {
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.panel-header h3 {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  margin: 0;
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Responsive for Mobile Devices */
}
.quantity-input-wrapper.large-pill .btn-qty-adjust {
  width: 0 !important;
  height: 32px !important;
  font-size: 16px !important;
  border-radius: 6px;
}
.quantity-input-wrapper.large-pill:focus-within .btn-qty-adjust,
.quantity-input-wrapper.large-pill.active-focus .btn-qty-adjust {
  opacity: 1;
  visibility: visible;
  width: 32px !important;
  pointer-events: auto;
}
.quantity-input-wrapper.large-pill input {
  height: 32px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Light Theme overrides for pill selector */
body.light-theme .quantity-input-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.15);
}
body.light-theme .btn-qty-adjust:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
body.light-theme .quantity-input-wrapper input {
  color: #0f172a !important;
}

/* --- ORANGE OFFLINE PULSE --- */
@keyframes pulse-orange {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Transition mượt mà khi đổi giao diện sáng/tối */
body, .card, .section, header, .form-control, .defect-input, .settings-tab-btn, .device-item-card, .profile-dropdown-menu, .modal-content, .btn-install, .quantity-input-wrapper button {
  transition: background 0.3s ease, background-color 0.3s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease !important;
}

#themeToggleBtn {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease !important;
}
#themeToggleBtn:hover {
  transform: rotate(45deg) scale(1.15);
  color: var(--accent-color) !important;
}

/* --- DASHBOARD STYLES --- */
.container.dashboard-active {
  max-width: 1200px !important;
  width: 95% !important;
}

.dashboard-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.kpi-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

.kpi-sub.green {
  color: #34d399;
}

.kpi-sub-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: visible;
  margin-top: 6px;
}

.kpi-sub-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 2px rgba(2, 132, 199, 0.6));
}

.kpi-sub-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: scanning 2s infinite linear;
}

@keyframes scanning {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
}

.dashboard-panel {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.panel-header {
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.panel-header h3 {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  margin: 0;
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Responsive for Mobile Devices */
@media (max-width: 768px) {
  .dashboard-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 8px 0 !important;
  }
  .section, body.light-theme .section {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
}

/* --- Landscape Mode Mobile Adjustments (Option 2) --- */
@media (orientation: landscape) and (max-width: 1024px) {
  /* Expand Header to full screen width and make it thinner */
  .header-container {
    max-width: 100% !important;
    padding: 0 8px !important;
  }
  
  header {
    padding: 4px 10px !important;
  }
  
  .app-title-area img {
    width: 26px !important;
    height: 26px !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
  }
  
  .app-title-area h1 {
    font-size: 12px !important;
  }
  
  .app-title-area p.subtitle {
    display: none !important;
  }
  
  /* Expand Main Container to full width */
  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 4px 8px !important;
  }
  
  /* Convert Tab menu to a single horizontal-scrollable row */
  .tab-container {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    padding: 3px !important;
    border-radius: 8px !important;
    gap: 4px !important;
    
    /* Hide scrollbar browser defaults */
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
  
  .tab-indicator {
    border-radius: 6px !important;
  }
  
  .tab-container::-webkit-scrollbar {
    display: none !important;
  }
  
  .tab-btn {
    flex: 0 0 auto !important;
    padding: 4px 8px !important;
    font-size: 10.5px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
  }
  
  /* Hide the Korean subtitles on tab buttons to save space */
  .tab-btn span:nth-child(3) {
    display: none !important;
  }
  
  /* Adjust Dashboard spacing */
  .section {
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }
  
  .dashboard-kpi-row {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  
  .kpi-card {
    padding: 8px 10px !important;
    gap: 2px !important;
  }
  
  .kpi-value {
    font-size: 15px !important;
  }
  
  .kpi-title {
    font-size: 8px !important;
  }
  
  .kpi-sub {
    font-size: 8px !important;
  }
  
  /* Set 3 columns in landscape mode to keep charts side by side */
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
  
  .dashboard-panel {
    min-width: 0 !important;
  }
}

/* Custom Date Selector Button (Image 3 Style) */
.custom-date-btn {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  background-color: rgba(51, 65, 85, 0.5); /* Muted gray-blue background */
  color: #cbd5e1; /* Muted light text */
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  height: 28px;
  box-sizing: border-box;
}

.custom-date-btn:hover {
  background-color: rgba(71, 85, 105, 0.7);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.25);
}

.custom-date-btn:active {
  transform: scale(0.96);
}

/* --- RADIAL MENU STYLES --- */
.radial-menu-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  padding: 10px 0;
  gap: 4px;
  box-sizing: border-box;
}

.radial-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 36%;
  z-index: 10;
  justify-content: center;
  align-self: stretch;
}

.radial-column.left {
  align-items: flex-end;
}

.radial-column.right {
  align-items: flex-start;
}

.radial-tab-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border-radius: 30px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
  text-align: left;
  outline: none;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 1;
}

.radial-tab-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.radial-tab-item:active {
  transform: translateY(0);
}

/* Rotating laser glow border (Image 1 Style) */
.radial-tab-item::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 400%;
  height: 400%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--glow-color, #06b6d4) 25%,
    transparent 50%
  );
  animation: borderRotate 4s linear infinite;
  z-index: -2;
  pointer-events: none;
  opacity: 0.85;
}

/* Solid background overlay inside capsule to leave 2.5px glowing border */
.radial-tab-item::after {
  content: '';
  position: absolute;
  inset: 2.5px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  z-index: -1;
  pointer-events: none;
  transition: background 0.3s ease;
}

.radial-column.left .radial-tab-item {
  justify-content: flex-end;
  text-align: right;
}

.radial-column.left .radial-tab-item[data-target="tabInput"] {
  justify-content: flex-start;
  text-align: left;
}

.radial-tab-item:hover::after {
  background: rgba(30, 41, 59, 0.9);
}

.radial-tab-item:hover::before {
  animation-duration: 2s; /* Speed up rotation on hover */
}

.radial-tab-item .icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.radial-tab-item:hover .icon {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.radial-tab-item .text-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.radial-tab-item .title {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.radial-tab-item .sub {
  font-size: 8px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.radial-tab-item:hover .sub {
  color: #cbd5e1;
}

/* Center Circle (Mockup Style circular progress outer ring + inner core) */
.radial-center-wrapper {
  position: relative;
  width: 28%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.radial-center-outer {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 8px; /* Thicker progress ring */
  background: conic-gradient(#10b981 0%, #06b6d4 0%, rgba(255, 255, 255, 0.05) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.4), inset 0 0 20px rgba(6, 182, 212, 0.2);
  z-index: 10;
  animation: float 4s ease-in-out infinite;
  box-sizing: border-box;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.radial-center-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 75%, #020617 100%);
  border: 2.2px solid rgba(6, 182, 212, 0.45); /* Thin inner sci-fi cyan glow ring */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 15px rgba(6, 182, 212, 0.25);
  box-sizing: border-box;
  padding: 8px;
  position: relative;
  overflow: hidden;
}

/* Glass reflection shine on center circle (3D gloss dome effect) */
.radial-center-inner::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 10px;
  right: 10px;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-radius: 70px 70px 40px 40px;
  pointer-events: none;
  z-index: 12;
}

/* SVG Lines connecting buttons to center */
.radial-svg-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260%;
  height: 180%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.neon-line {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

/* Animate lines on hover of corresponding button */
.radial-tab-item[data-target="tabInput"]:hover ~ .radial-center-wrapper .line-1 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #06b6d4) !important; }
.radial-tab-item[data-target="tabHistory"]:hover ~ .radial-center-wrapper .line-2 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #3b82f6) !important; }
.radial-tab-item[data-target="tabShiftReport"]:hover ~ .radial-center-wrapper .line-3 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #10b981) !important; }
.radial-tab-item[data-target="tabNewOrder"]:hover ~ .radial-center-wrapper .line-4 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #6366f1) !important; }
.radial-tab-item[data-target="tabLineLayout"]:hover ~ .radial-center-wrapper .line-5 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #6366f1) !important; }
.radial-tab-item[data-target="tabOqcErrors"]:hover ~ .radial-center-wrapper .line-6 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #ef4444) !important; }
.radial-tab-item[data-target="tabKhReport"]:hover ~ .radial-center-wrapper .line-7 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #06b6d4) !important; }
.radial-tab-item[data-target="tabDashboard"]:hover ~ .radial-center-wrapper .line-8 { stroke-width: 3px !important; filter: drop-shadow(0 0 6px #10b981) !important; }

/* Status Indicators Styling */
.status-indicator-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

.status-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 1;
}

/* Rotating glowing border for status rings */
.status-ring::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 400%;
  height: 400%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--glow-color, #10b981) 25%,
    transparent 50%
  );
  animation: borderRotate 4s linear infinite;
  z-index: -2;
  pointer-events: none;
  opacity: 0.85;
}

/* Inset background for status rings to show rotating border through 1.5px gap */
.status-ring::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.status-ring.green {
  --glow-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.status-ring.blue {
  --glow-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
  color: #3b82f6;
}

.status-indicator-item:hover .status-ring {
  transform: translateY(-3px) scale(1.05);
}

.status-indicator-item:hover .status-ring.green {
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.55);
}

.status-indicator-item:hover .status-ring.blue {
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.55);
}

/* Center Circle radar decor rings */
.radial-center-radar {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1.2px dashed rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
  animation: pulseRadar 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

.radial-center-radar-outer {
  position: absolute;
  width: 195px;
  height: 195px;
  border-radius: 50%;
  border: 1px dotted rgba(16, 185, 129, 0.25);
  animation: rotateRingBack 30s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes rotateRingBack {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Specific Pill Color Modifications (Defines glow-color CSS variable for rotating light beam) */
.radial-tab-item.cyan {
  --glow-color: #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.45);
}
.radial-tab-item.cyan .icon {
  border: 1.8px solid rgba(6, 182, 212, 0.65) !important;
  background: rgba(6, 182, 212, 0.15) !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
  color: #06b6d4;
}

.radial-tab-item.blue {
  --glow-color: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45);
}
.radial-tab-item.blue .icon {
  border: 1.8px solid rgba(59, 130, 246, 0.65) !important;
  background: rgba(59, 130, 246, 0.15) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.radial-tab-item.green {
  --glow-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}
.radial-tab-item.green .icon {
  border: 1.8px solid rgba(16, 185, 129, 0.65) !important;
  background: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.radial-tab-item.cyan-indigo {
  --glow-color: #6366f1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
}
.radial-tab-item.cyan-indigo .icon {
  border: 1.8px solid rgba(99, 102, 241, 0.65) !important;
  background: rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
  color: #6366f1;
}

.radial-tab-item.indigo {
  --glow-color: #6366f1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
}
.radial-tab-item.indigo .icon {
  border: 1.8px solid rgba(99, 102, 241, 0.65) !important;
  background: rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
  color: #6366f1;
}

.radial-tab-item.red {
  --glow-color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
}
.radial-tab-item.red .icon {
  border: 1.8px solid rgba(239, 68, 68, 0.65) !important;
  background: rgba(239, 68, 68, 0.15) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.radial-tab-item.blue-cyan {
  --glow-color: #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.45);
}
.radial-tab-item.blue-cyan .icon {
  border: 1.8px solid rgba(6, 182, 212, 0.65) !important;
  background: rgba(6, 182, 212, 0.15) !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
  color: #06b6d4;
}

.radial-tab-item.emerald {
  --glow-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}
.radial-tab-item.emerald .icon {
  border: 1.8px solid rgba(16, 185, 129, 0.65) !important;
  background: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  color: #10b981;
}

/* Animations */
@keyframes borderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Light Theme Overrides for Radial Menu */
body.light-theme .radial-tab-item::after {
  background: rgba(255, 255, 255, 0.95);
}
body.light-theme .radial-tab-item {
  color: #1e293b;
}
body.light-theme .radial-center-outer {
  background: conic-gradient(#059669 0%, #0284c7 0%, rgba(15, 23, 42, 0.05) 0%);
  border-color: rgba(2, 132, 199, 0.2);
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.15);
}
body.light-theme .radial-center-inner {
  background: radial-gradient(circle, #f8fafc 40%, #e2e8f0 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}
body.light-theme .radial-center-content .metric-value {
  background: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-theme .radial-center-content .metric-label {
  color: #475569;
}
body.light-theme .status-ring {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}
body.light-theme .status-ring.green {
  border-color: rgba(5, 150, 105, 0.4);
  color: #059669;
}
body.light-theme .status-ring.blue {
  border-color: rgba(37, 99, 235, 0.4);
  color: #2563eb;
}

/* Hide the top tab bar completely as requested */
.tab-container {
  display: none !important;
}

/* Custom Operational Status Footer for mobile */
.radial-status-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px 14px 16px;
  z-index: 100;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

#homeSection {
  padding-bottom: 120px !important;
}

.status-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 480px;
  margin: 0 auto;
}

.status-footer-indicators {
  display: flex;
  justify-content: space-around;
  width: 100%;
  align-items: center;
}

.radial-status-footer .status-indicator-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radial-status-footer .status-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.02);
}

.radial-status-footer .status-ring.green {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.radial-status-footer .status-ring.blue {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.status-info-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-info-group .label {
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.status-info-group .value {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 2px;
}

.status-info-group .value.green {
  color: #10b981;
}

.status-info-group .value.blue {
  color: #3b82f6;
}

.status-footer-text {
  font-size: 9.5px;
  color: #64748b;
  font-weight: 600;
  margin: 2px 0 0 0;
  letter-spacing: 0.3px;
}

/* Light Theme support for Footer */
body.light-theme .radial-status-footer {
  background: rgba(248, 250, 252, 0.88);
  border-top-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.05);
}
body.light-theme .status-info-group .label {
  color: #64748b;
}
body.light-theme .status-footer-text {
  color: #64748b;
}

/* Custom premium status pills */
.status-footer-wrapper {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.status-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.01), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.status-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}
.status-pill .label {
  opacity: 0.85;
}
.status-pill .value {
  font-weight: 800;
}
.status-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .status-pill {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}
body.light-theme .status-divider {
  background: rgba(15, 23, 42, 0.12);
}

@keyframes pulseRadar {
  0% { transform: scale(0.98) rotate(0deg); opacity: 0.15; }
  50% { transform: scale(1.03) rotate(180deg); opacity: 0.35; }
  100% { transform: scale(0.98) rotate(360deg); opacity: 0.15; }
}
