:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --secondary: #2196F3;
  --danger: #f44336;
  --warning: #ff9800;
  --success: #4CAF50;
  --dark: #333;
  --light: #f5f5f5;
  --gray: #9e9e9e;
  --white: #fff;
  --shadow: 0 2px 5px rgba(0,0,0,0.1);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-small {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Przyciski modułów */
.module-actions {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.btn-module {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.btn-module:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-farm {
  background: linear-gradient(135deg, #8BC34A, #689F38);
  color: white;
}
.btn-farm:hover {
  background: linear-gradient(135deg, #689F38, #558B2F);
  border-color: #33691E;
}

.btn-forestry {
  background: linear-gradient(135deg, #795548, #5D4037);
  color: white;
}
.btn-forestry:hover {
  background: linear-gradient(135deg, #5D4037, #4E342E);
  border-color: #3E2723;
}

.btn-stalls {
  background: linear-gradient(135deg, #FF9800, #F57C00);
  color: white;
}
.btn-stalls:hover {
  background: linear-gradient(135deg, #F57C00, #E65100);
  border-color: #E65100;
}

.btn-cycle {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
}
.btn-cycle:hover {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  border-color: #0D47A1;
}

/* Status wykonania modułu */
.module-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #FFF3E0;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #FF9800;
}

.module-status.success {
  background: #E8F5E9;
  border-left-color: #4CAF50;
}

.module-status.error {
  background: #FFEBEE;
  border-left-color: #f44336;
}

.module-status .status-icon {
  font-size: 24px;
}

.module-status .status-text {
  font-weight: 500;
}

/* Śledzenie zbiorów na żywo */
.live-tracking {
  margin-bottom: 20px;
}

.live-harvests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.harvest-item {
  background: white;
  border-radius: 8px;
  padding: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

.harvest-item.ready {
  border-left-color: #4CAF50;
  background: #E8F5E9;
}

.harvest-item.growing {
  border-left-color: #FF9800;
}

.harvest-item .field-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--dark);
}

.harvest-item .plant-name {
  font-size: 12px;
  color: var(--gray);
}

.harvest-item .time-left {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 5px;
}

.harvest-item.ready .time-left {
  color: #4CAF50;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2E7D32 0%, #81C784 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
  text-align: center;
  margin-bottom: 10px;
  color: var(--primary);
}

.login-box .subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 30px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.tab.active {
  background: var(--primary);
  color: var(--white);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.message {
  padding: 10px;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 15px;
}

.message.error {
  background: #ffebee;
  color: var(--danger);
}

.message.success {
  background: #e8f5e9;
  color: var(--success);
}

.hidden {
  display: none !important;
}

/* Dashboard */
.navbar {
  background: var(--white);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.container {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--white);
  padding: 20px;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar h3 {
  color: var(--dark);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.account-item {
  padding: 12px;
  background: var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.account-item:hover {
  background: #e8f5e9;
}

.account-item.active {
  border-color: var(--primary);
  background: #e8f5e9;
}

.account-item .email {
  font-weight: 500;
  font-size: 14px;
  word-break: break-all;
}

.account-item .server {
  font-size: 12px;
  color: var(--gray);
}

.account-item .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  margin-top: 5px;
}

.status-badge.active {
  background: var(--success);
  color: var(--white);
}

.status-badge.inactive {
  background: var(--gray);
  color: var(--white);
}

.sidebar-section {
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.sidebar-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 10px;
}

.status-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--light);
  border-radius: var(--radius);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray);
}

.status-indicator.running {
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.welcome-screen {
  text-align: center;
  padding: 60px 20px;
}

.welcome-screen h2 {
  color: var(--primary);
  margin-bottom: 15px;
}

.quick-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.stat-card {
  background: var(--white);
  padding: 25px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: bold;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--gray);
}

/* Account Details */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.account-header h2 {
  color: var(--dark);
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs-container {
  margin-bottom: 20px;
}

.tabs-container .tabs {
  border-bottom: 2px solid #eee;
}

.tabs-container .tab {
  background: transparent;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tabs-container .tab.active {
  background: transparent;
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-grid .stat-card {
  padding: 20px;
}

.stats-grid .stat-number {
  font-size: 24px;
}

.section {
  margin-top: 30px;
}

.section h3 {
  margin-bottom: 15px;
  color: var(--dark);
}

.no-data {
  color: var(--gray);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Fields */
.fields-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  margin-top: 20px;
}

.fields-header:first-child {
  margin-top: 0;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.field-card {
  background: var(--light);
  padding: 15px;
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid transparent;
}

.field-card.empty {
  border-color: var(--gray);
  opacity: 0.7;
}

.field-card.growing {
  border-color: var(--warning);
}

.field-card.ready {
  border-color: var(--success);
  background: #e8f5e9;
}

.field-card .field-index {
  font-weight: bold;
  font-size: 12px;
  color: var(--gray);
}

.field-card .plant-name {
  font-weight: 500;
  margin: 5px 0;
}

.field-card .time-remaining {
  font-size: 12px;
  color: var(--warning);
}

/* Settings */
.settings-form {
  max-width: 600px;
}

.settings-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.settings-section h3 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 0.65em;
  padding: 2px 8px;
  background: #ffc107;
  color: #000;
  border-radius: 4px;
  font-weight: normal;
}

.form-row {
  margin-bottom: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Logs */
.logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.logs-list {
  max-height: 500px;
  overflow-y: auto;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  font-size: 12px;
  color: var(--gray);
  white-space: nowrap;
}

.log-type {
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--light);
}

.log-details {
  flex: 1;
  font-size: 14px;
}

.log-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.log-status.success {
  background: var(--success);
}

.log-status.failed {
  background: var(--danger);
}

/* Harvests */
.harvests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.harvest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--light);
  border-radius: var(--radius);
}

.harvest-info {
  display: flex;
  gap: 15px;
  align-items: center;
}

.harvest-plant {
  font-weight: 500;
}

.harvest-field {
  font-size: 12px;
  color: var(--gray);
}

.harvest-time {
  font-size: 14px;
  color: var(--warning);
  font-weight: 500;
}

/* Actions Chart */
.actions-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.action-stat {
  background: var(--light);
  padding: 15px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-stat .count {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.action-stat .label {
  font-size: 14px;
  color: var(--gray);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 450px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1001;
}

.toast {
  padding: 15px 25px;
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 500;
  animation: slideIn 0.3s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--secondary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  
  .account-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== NOWY DASHBOARD ==================== */

/* Panel statusu gry */
.game-status-panel {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.game-status-panel h3 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-status-panel h3 small {
  font-weight: normal;
  font-size: 12px;
  color: var(--gray);
}

.status-section {
  margin-bottom: 20px;
}

.status-section h4 {
  margin-bottom: 10px;
  color: var(--dark);
  font-size: 14px;
}

/* Status straganów */
.stalls-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.stall-status-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.stall-status-card h5 {
  margin-bottom: 10px;
  color: var(--dark);
}

.slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.slot-status.locked {
  background: #f0f0f0;
  color: #888;
}

.slot-status.empty {
  background: #fff3e0;
  color: #e65100;
}

.slot-status.full {
  background: #e8f5e9;
  color: #2e7d32;
}

.slot-status.partial {
  background: #fff8e1;
  color: #f57c00;
}

.slot-status.low {
  background: #ffebee;
  color: #c62828;
}

.slot-amount {
  font-weight: 600;
  margin-left: auto;
  padding-left: 10px;
}

.stall-summary {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray);
  border-top: 1px solid #e0e0e0;
  padding-top: 10px;
}

/* Status pól */
.fields-status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-status-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.field-status-item.ready {
  background: #e8f5e9;
  border-color: #4caf50;
}

.field-status-item.growing {
  background: #fff8e1;
  border-color: #ffc107;
}

.field-status-item .field-location {
  font-weight: 600;
  color: #333;
  min-width: 140px;
}

.field-status-item .field-plant {
  flex: 1;
  font-weight: 500;
  color: var(--gray);
}

.field-status-item .field-time {
  font-weight: 600;
  color: #ff9800;
  min-width: 80px;
  text-align: right;
}

.field-status-item .field-time.ready {
  color: #4caf50;
}

/* Legacy classes */
.field-status-item .field-name {
  flex: 1;
  font-weight: 500;
}

.field-status-item .field-type {
  color: var(--gray);
  font-size: 12px;
}

/* Status tartaku */
.forestry-status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.forestry-status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.forestry-status-item.ready {
  background: #e8f5e9;
  border-color: #4caf50;
}

.forestry-status-item.working {
  background: #e3f2fd;
  border-color: #2196f3;
}

.forestry-status-item.growing {
  background: #fff8e1;
  border-color: #ffc107;
}

.forestry-status-item.empty {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

.forestry-status-item .forestry-icon {
  font-size: 18px;
}

.forestry-status-item .forestry-name {
  flex: 1;
  font-weight: 500;
}

.forestry-status-item .forestry-time {
  font-weight: 600;
  color: var(--gray);
}

.forestry-status-item.ready .forestry-time {
  color: #4caf50;
}

.forestry-status-item.working .forestry-time {
  color: #2196f3;
}

.forestry-status-item.growing .forestry-time {
  color: #ff9800;
}

/* Panel konfiguracji */
.config-panel {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.config-panel h3 {
  margin-bottom: 10px;
}

.config-info {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 15px;
}

/* Konfiguracja straganów */
.stalls-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.stall-config-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.stall-config-card h4 {
  margin-bottom: 12px;
  font-size: 14px;
}

/* Konfiguracja tartaku */
.forestry-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.forestry-tree-select {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #a5d6a7;
}

.forestry-tree-select h4 {
  margin-bottom: 12px;
  font-size: 14px;
  color: #2e7d32;
}

.forestry-building-card {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #ffd54f;
}

.forestry-building-card h4 {
  margin-bottom: 12px;
  font-size: 14px;
  color: #f57f17;
}

.slot-config {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.slot-config label {
  min-width: 60px;
  font-size: 13px;
  font-weight: 500;
}

.slot-config select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

/* Grid modułów */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.module-config-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.module-config-card h4 {
  margin-bottom: 12px;
  font-size: 14px;
}

.module-config-card .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  cursor: pointer;
}

.module-config-card .checkbox-label input {
  width: 16px;
  height: 16px;
}

.module-config-card .module-desc {
  font-size: 11px;
  color: #666;
  margin: 8px 0 0 0;
  font-style: italic;
}

/* Kompaktowe logi */
.logs-list-compact {
  max-height: 300px;
  overflow-y: auto;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.log-item:last-child {
  border-bottom: none;
}

.log-item .log-time {
  color: var(--gray);
  font-size: 11px;
  min-width: 120px;
}

.log-item .log-type {
  flex: 1;
  font-weight: 500;
}

.log-item .log-status {
  font-size: 14px;
}

.log-item.error {
  background: #fff5f5;
}

/* Przycisk info */
.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

/* No data */
.no-data {
  color: var(--gray);
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* ========================================
   HARMONOGRAM / SCHEDULER
   ======================================== */

/* Zakładki harmonogramu */
.scheduler-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0;
}

.scheduler-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.scheduler-tab:hover {
  color: var(--primary);
  background: rgba(76, 175, 80, 0.05);
}

.scheduler-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Zawartość zakładek */
.scheduler-tab-content {
  margin-bottom: 20px;
}

.scheduler-tab-panel {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid #e0e0e0;
}

.scheduler-tab-panel.hidden {
  display: none;
}

.scheduler-tab-panel h4 {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.scheduler-tab-panel .option-info {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.4;
}

.module-last-run {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: var(--gray);
}

.module-last-run span:last-child {
  font-weight: 500;
  color: var(--dark);
}

/* Status harmonogramu */
.scheduler-status-box {
  background: #f0f7ff;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid #cce5ff;
  margin-bottom: 15px;
}

.scheduler-status-box h4 {
  margin-bottom: 12px;
  color: #004085;
  font-size: 14px;
}

#schedulerActiveStatus {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.status-indicator.active {
  background: var(--success);
  animation: pulse 2s infinite;
}

.status-indicator.inactive {
  background: var(--gray);
}

.queue-info {
  font-size: 13px;
  color: var(--dark);
  margin-bottom: 8px;
}

.queue-info span:nth-child(2) {
  font-weight: 600;
  color: var(--secondary);
}

.current-task {
  padding: 10px;
  background: #fff3cd;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 10px;
}

.current-task.hidden {
  display: none;
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-unit input {
  width: 80px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.input-with-unit span {
  color: var(--gray);
  font-size: 14px;
}

.scheduler-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #43a047;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #e53935;
}

/* Status schedulera w sidebarze */
.status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 13px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray);
}

.status-indicator.running {
  background: var(--success);
  animation: pulse 2s infinite;
}

.status-indicator.stopped {
  background: var(--danger);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Time input */
input[type="time"] {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 120px;
}

input[type="time"]:focus {
  outline: none;
  border-color: var(--primary);
}

/* Smart Mode Box */
.smart-mode-box {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid #ffcc80;
  margin-bottom: 20px;
}

.smart-mode-box h4 {
  margin-bottom: 8px;
  color: #e65100;
  font-size: 15px;
}

.smart-mode-box .option-info {
  font-size: 12px;
  color: #bf360c;
  margin-bottom: 12px;
  line-height: 1.4;
}

.smart-mode-box .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark);
}

.smart-mode-box .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #e65100;
}

/* Settings Box w Sidebar */
.settings-box {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
}

.settings-box .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

.settings-box .checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.settings-box .option-hint {
  font-size: 11px;
  color: var(--gray);
  margin-top: 5px;
  line-height: 1.3;
}
