#svc-sections-panel {
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  padding: 0;
  margin: 0;
  width: 100%;
}

#svc-sections-panel .csp-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02);
}

#svc-sections-panel .csp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

#svc-sections-panel .csp-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}

#svc-sections-panel .csp-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

#svc-sections-panel .csp-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

#svc-sections-panel .csp-btn:hover { opacity: 0.88; }
#svc-sections-panel .csp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

#svc-sections-panel .csp-btn-primary { background: #1677ff; color: #fff; }
#svc-sections-panel .csp-btn-success { background: #52c41a; color: #fff; }
#svc-sections-panel .csp-btn-default { background: #fff; color: rgba(0,0,0,.88); border: 1px solid #d9d9d9; }
#svc-sections-panel .csp-btn-link { background: transparent; color: #1677ff; padding: 4px 8px; }
#svc-sections-panel .csp-btn-danger { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
#svc-sections-panel .csp-btn-warning { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }

#svc-sections-panel .csp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#svc-sections-panel .csp-table th,
#svc-sections-panel .csp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
}

#svc-sections-panel .csp-table th {
  background: #fafafa;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}

#svc-sections-panel .csp-table td.csp-center { text-align: center; }

#svc-sections-panel .csp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

#svc-sections-panel .csp-section-card {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}

#svc-sections-panel .csp-section-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#svc-sections-panel .csp-section-img {
  height: 130px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#svc-sections-panel .csp-section-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#svc-sections-panel .csp-section-body {
  padding: 12px 14px 14px;
}

#svc-sections-panel .csp-section-name {
  font-weight: 600;
  margin-bottom: 10px;
  color: rgba(0, 0, 0, 0.88);
}

#svc-sections-panel .csp-actions { display: flex; flex-wrap: wrap; gap: 8px; }

#svc-sections-panel .csp-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(0, 0, 0, 0.45);
}

#svc-sections-panel .csp-loading {
  text-align: center;
  padding: 32px;
  color: rgba(0, 0, 0, 0.45);
}

.csp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.csp-modal {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  direction: rtl;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.csp-modal h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
}

.csp-modal label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.88);
}

.csp-modal input[type="text"],
.csp-modal input[type="file"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.csp-modal input[type="text"]:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.csp-modal-preview {
  margin-top: 12px;
  min-height: 60px;
}

.csp-modal-preview img {
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.csp-modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.csp-modal-footer .csp-btn { flex: 1; }

.csp-home-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #f6f9ff;
  border: 1px solid #d6e4ff;
  border-radius: 8px;
}

.csp-home-settings label {
  font-size: 13px;
  font-weight: 600;
  color: #1a237e;
}

.csp-home-settings select {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}

.csp-hint {
  font-size: 12px;
  color: #2e7d32;
}

.csp-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.csp-badge-ok { background: #e8f5e9; color: #2e7d32; }
.csp-badge-off { background: #eeeeee; color: #616161; }
.csp-badge-home { background: #e3f2fd; color: #1565c0; }
.csp-badge-muted { background: #fff3e0; color: #ef6c00; }

.csp-order-input {
  width: 64px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  text-align: center;
}

.csp-order-input:disabled {
  background: #f5f5f5;
  color: #bbb;
}

#svc-sections-panel .csp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
