/* AdminBarNova Admin Styles */
.wrap {
  margin: 0;
}
/* General Styles */
.adminbarnova-wrap {
  max-width: 100%;
  margin-left: -10px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
}

/* Header */
.adminbarnova-header {
  background: #667eea;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  padding: 30px;
  border-radius: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  color: #fff;
  margin-bottom: 30px;
  margin-left: -10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.adminbarnova-header .header-content {
  display: flex;
  gap: 20px;
}
.adminbarnova-header .header-content img {
  width: 80px;
  height: 80px;
}
.adminbarnova-header .header-content h1 {
  margin: 0;
  padding: 0;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.adminbarnova-header .subtitle {
  margin: 5px 0 0;
  opacity: 0.9;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  padding-left: 0;
}

.adminbarnova-version {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Cards */
.adminbarnova-main {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  /* box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); */
  margin-bottom: 30px;
  transition: all 0.3s ease;
  border: 1px solid #e9e9e9;
}
/* .adminbarnova-card {

} */

.adminbarnova-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
  font-size: 22px;
}

.adminbarnova-card h2 i {
  color: #667eea;
  margin-right: 10px;
}

.adminbarnova-card .description {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #667eea;
}

/* Form Fields */
.form-field {
  margin-bottom: 25px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-field .field-description {
  color: #666;
  font-size: 13px;
  margin-top: 15px;
  font-weight: normal;
  width: max-content;
  padding: 5px 10px;
}

/* Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 60px;
  min-height: 30px;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle-label input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-label .toggle-text {
  font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 30px;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-label:hover input ~ .checkmark {
  background-color: #ddd;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #667eea;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label .label-text {
  margin-left: 5px;
}

/* Device Labels */
.device-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #e9e9e9;
  transition: all 0.3s ease;
  min-width: 80px;
}

.device-label:hover {
  border-color: #667eea;
  background: #f8f9fa;
}

.device-label input {
  display: none;
}

.device-label .device-icon {
  font-size: 32px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.device-label input:checked ~ .device-icon {
  color: #667eea;
}

.device-label input:checked ~ .device-name {
  color: #667eea;
  font-weight: 600;
}

.device-label .device-name {
  font-size: 14px;
}

/* Device Preview */
.device-preview-wrapper {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.device-preview-wrapper h4 {
  margin: 0 0 15px 0;
  color: #333;
}

.device-icons {
  display: flex;
  gap: 20px;
  font-size: 28px;
}

.device-icons .device-icon {
  opacity: 0.3;
  transition: all 0.3s ease;
}

.device-icons .device-icon.active {
  opacity: 1;
  color: #667eea;
}

/* Time Schedule */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.days-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.day-label {
  display: flex;
  align-items: center;
}

.day-label input {
  display: none;
}

.day-label .day-name {
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  border: 1px solid #e9e9e9;
}
.day-label .day-name:hover {
  color: #fff;
  background: #667eea;
  border-color: #667eea;
}

.day-label input:checked ~ .day-name {
  color: #fff;
  background: #667eea;
  border-color: #667eea;
}

/* Menu Items Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.menu-item-label {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #e9e9e9;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-item-label:hover {
  background: #f8f9fa;
  border-color: #667eea;
}

.menu-item-label input {
  margin-right: 10px;
}

.menu-item-label .menu-icon {
  margin-right: 10px;
  color: #667eea;
  width: 20px;
  text-align: center;
}

.menu-item-label .menu-name {
  font-size: 14px;
}

/* Logo Upload */
.logo-upload-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.logo-upload-wrapper input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.logo-upload-wrapper .button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.logo-preview {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  width: 100%;
  max-width: 150px;
}

.logo-preview img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Preview Section */
.preview-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9e9e9;
}

.admin-bar-preview {
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.preview-bar {
  padding: 15px 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-text {
  font-size: 16px;
  font-weight: 500;
}

.preview-text i {
  margin-right: 8px;
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stat-box {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.stat-box .stat-icon {
  font-size: 32px;
  color: #667eea;
  opacity: 0.7;
}

.stat-box .stat-content {
  flex: 1;
}

.stat-box h4 {
  margin: 0 0 5px 0;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

/* Chart */
.chart-container {
  max-width: 500px;
  margin: 30px auto;
  position: relative;
}

.chart-data {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9e9e9;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Actions */
.adminbarnova-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.adminbarnova-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 25px;
  font-weight: 500;
}

.adminbarnova-actions .button-primary {
  background: #667eea;
  border-color: #667eea;
}

.adminbarnova-actions .button-primary:hover {
  background: #5a6fd6;
  border-color: #5a6fd6;
}

.loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.status-message {
  padding: 10px 15px;
  border-radius: 6px;
  display: none;
  font-weight: 500;
}

.status-message.success {
  display: inline-flex;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-message.error {
  display: inline-flex;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Tabs */
.nav-tab-active,
.nav-tab-active:focus,
.nav-tab-active:focus:active,
.nav-tab-active:hover {
  border: none !important;
  background: #667eea;
  box-shadow: none !important;
  outline: none !important;
  margin-bottom: 0;
}
.nav-tab-wrapper {
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.nav-tab {
  padding: 12px 20px;
  text-decoration: none;
  color: #667eea;
  background: #f5f5f5;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  border-top: 1px solid #667eea;
  border-left: 1px solid #667eea;
  border-right: 1px solid #667eea;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
  font-weight: 500;
  margin-left: 0;
}

.nav-tab .fas {
  margin-right: 8px;
}

.nav-tab:hover {
  background: #667eea;
  color: #fff;
}

.nav-tab.nav-tab-active {
  background: #667eea;
  color: #fff;
}

/* Tab Content */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
/* Import/Export Styles */
.import-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.import-file-input {
  padding: 8px 12px;
  border: 2px dashed #e9e9e9;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  min-width: 250px;
}

.import-file-input:hover {
  border-color: #667eea;
  background: #f0f0ff;
}

.import-file-input:focus {
  outline: none;
  border-color: #667eea;
}

.warning {
  color: #dc3545 !important;
  background: #f8d7da !important;
  border-left-color: #dc3545 !important;
}

/* Export button styles */
.export-settings,
.import-settings,
.reset-settings {
  min-width: 180px;
  justify-content: center;
}

.export-settings .fas,
.import-settings .fas,
.reset-settings .fas {
  margin-right: 8px;
}

/* Responsive import/export */
@media (max-width: 768px) {
  .import-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .import-file-input {
    min-width: auto;
    width: 100%;
  }

  .export-settings,
  .import-settings,
  .reset-settings {
    min-width: auto;
    width: 100%;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .adminbarnova-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .adminbarnova-header .header-content {
    margin-bottom: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-tab-wrapper {
    flex-direction: column;
    border-bottom: none;
  }

  .nav-tab {
    border-radius: 8px;
    text-align: center;
  }

  .adminbarnova-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .adminbarnova-actions .button {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .days-group {
    gap: 5px;
  }

  .day-label {
    padding: 6px 10px;
  }
}
